Debra Waybright Posted January 6, 2023 Share Posted January 6, 2023 Ours seem to keep getting cleared (not sure how or why) and then we lose that information if we want to go back and see if there were errors or messages from previous runs. I'm wondering where they can be found so we can archive them regularly.Thanks! Link to comment Share on other sites More sharing options...
Solution Guest Posted January 6, 2023 Solution Share Posted January 6, 2023 Hi DebThere are 2 kinds of logs for Caster - one is the scheduler.log - that one really just watches the Caster software starting up and deciding to run a scheduled job etc. The other kind of log - the Job Logs is what I think you're looking for. This is the output of the reports as they're running - sort of like if you ran a report interactively from the >> command prompt. Number of records, lines etc... There's a place in the Configuration of caster to set the Log Purge Period. Maybe this is useful?Maybe that checkbox at the top that says to wipe out logs when caster starts has been checked somehow... Maybe you can get what you want from the BOTLOG2 table? Those are just thoughts off the top of the brain. Link to comment Share on other sites More sharing options...
Debra Waybright Posted January 6, 2023 Author Share Posted January 6, 2023 This is good info! I bet you are correct about the purge checkbox since our logs seemed to have disappeared after the last server reboot. I will check this out. Thank you so much! Link to comment Share on other sites More sharing options...
Debra Waybright Posted January 6, 2023 Author Share Posted January 6, 2023 Curiously, the check box is not selected for the purge but the 30 days is, and I think that is about when the server was rebooted. Maybe we should give ourselves a few more days...The BOTLOG2 table does have the info I am looking for! I don't suppose you know how to convert the LOGGED_STAMP field into a readable datetime? Link to comment Share on other sites More sharing options...
Guest Posted January 6, 2023 Share Posted January 6, 2023 Hi DebAlas, I don't have specific examples. I did find these: [solved]Convert UNIX Timestamp to DATE - Topic (informationbuilders.com)[sOLVED] Timestamp to date conversion - Topic (informationbuilders.com)Basically the idea is that these dates are a number of seconds since a base date. I'm pretty sure some of our older members have done these reports before. I just can't find their code. Maybe they'll see this and chime in. It looks like you might be able to do this right in the database - maybe make yourself a view of botlog2 to hit. I tried to use a sql server function to retrieve the value, but I got an error: Select top (100) dateadd(S, LOGGED_STAMP, '1970-01-01')From BOTLOG2Argument data type nvarchar is invalid for argument 2 of dateadd function.So SQL server doesn't like nvarchar for dateadd. Something similar must be possible. If nobody already knows the answer to this, I'll dig around more. Have a good weekend! Link to comment Share on other sites More sharing options...
Debra Waybright Posted January 9, 2023 Author Share Posted January 9, 2023 Thanks Toby. That's where I landed -- assuming it was seconds from a base date, but which one? and then how to get the nvarchar converted. If you figure it out, let me know! :)In the meantime, I guess I will have to set up a synonym and convert my query to Focus code. I appreciate the help! Link to comment Share on other sites More sharing options...
Debra Waybright Posted January 10, 2023 Author Share Posted January 10, 2023 Putting this here for future reference :)DEFINE FILE BOTLOG2EPOCH/HYYMDS = DT(1970-01-01T00:00:00.00);D_LOGGED_STAMP/D13=ATODBL(LOGGED_STAMP,'32','D13');TS_LOGGED_STAMP/HYYMDS = HADD(EPOC, 'ms', D_LOGGED_STAMP, 32, TS_LOGGED_STAMP);ENDNote: This gives GMT time zone time which is 5 hours difference from EST. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now