forums › forums › SQLyog › Sync tools, Migration, Scheduled Backup and Notifications › Linux Sja Return Code
- This topic is empty.
-
AuthorPosts
-
-
June 17, 2009 at 1:33 pm #11535Ken WeiseMember
Hi,
Does the Linux version of SJA issue a return code on errors? I am scripting an automated update and need to be able to tell if the process has errors or fails in any way. Is there a return code to check, or a list of possible errors that will be logged, so I can have the script notify me on failure? Thanks!
Edit: Also same question for the Windows version, I can use either.
-
June 17, 2009 at 2:01 pm #29129peterlaursenParticipant
no – not to my best knowledge at least.
We have other small requests for SJA (like –version parameter) so let us consider in this context.
-
June 18, 2009 at 6:11 am #29130nithinMemberQuote:Does the Linux version of SJA issue a return code on errors? I am scripting an automated update and need to be able to tell if the process has errors or fails in any way. Is there a return code to check, or a list of possible errors that will be logged, so I can have the script notify me on failure?
Linux SJA logs error to a file 'sja.log' that creates where the SJA.EXE runs. This is similar with Windows when SJA.EXE runs through command line.
If run through SQLyog wizard you can specify the path of sja.log where GUI provides an option for that(please see the screen shot attached)
Thanks
-
June 18, 2009 at 12:38 pm #29131Ken WeiseMembernithin wrote on Jun 18 2009, 02:11 AM:Linux SJA logs error to a file 'sja.log' that creates where the SJA.EXE runs. This is similar with Windows when SJA.EXE runs through command line.
If run through SQLyog wizard you can specify the path of sja.log where GUI provides an option for that(please see the screen shot attached)
Thanks
Yes, I know about the log file. But is there a list of possible errors reported in the log file? My intention, as stated, is to make an automated script to sync, and notify on errors. However, I don't know what to have the script look for in the log file in order to automatically report all error conditions.
-
June 18, 2009 at 2:03 pm #29132peterlaursenParticipant
Is it errors occurring with SJA itself of MySQL errors or both you are interested in and how detailed?
Do you want us to print all errors (and warnings?) that MySQL sends and if any of the kind occurs you want an error code that you can use for a condition in the script?
-
June 18, 2009 at 2:07 pm #29133Ken WeiseMemberpeterlaursen wrote on Jun 18 2009, 10:03 AM:Is it errors occurring with SJA itself of MySQL errors or both you are interested in and how detailed?
Do you want us to print all errors (and warnings?) that MySQL sends and if any of the kind occurs you want an error code that you can use for a condition in the script?
Of course, the more detailed the better. But an exit code of 0 for no errors, then an exit code of non-zero for an error is ok. Then you could possibly have a list of error codes and related text, depending on how far you're willing to take it. At a minimum, I think 0 for no error, 1 for warning(s), 2 for error(s). Then like I said, if you're willing to put the effort, other exit codes could exist for specific errors. That would be more work, as reporting 2 errors would be difficult.
Just knowing that an error occurred, would allow me to include the log file in a follow up email, which notifies of the error. Knowing that it's a warning or hard error would let us know how urgent it is to look into.
Thanks!
-
June 21, 2009 at 6:20 pm #29134peterlaursenParticipant
I have added here: http://code.google.com/p/sqlyog/issues/detail?id=1103
-
-
AuthorPosts
- You must be logged in to reply to this topic.