-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increased logging detail on logged messages to include a date-time stamp #124
base: master
Are you sure you want to change the base?
Conversation
Thanks! |
Good point. I'll take a look at making it optional. I may require some additional guidance on integrating that with the INI file and associated infrastructure. |
Added hooks into the INI system to enable or disable timestamps (default is no). One small issue I can't quite fix, though, is that it works correctly for every log except for the ODBC plugin log (which is where I really wanted it to work). I can't figure out why it's not honoring the logTimestamp setting from the INI file when the plugin is initialized. Thoughts? |
Are you sure you're updating the .so? ODBC is only special because it has to be renamed before you copy it to the NWN folder. That might be the cause. |
@@ -114,6 +125,7 @@ class CNWNXBase | |||
gline* nwnxConfig; | |||
const char * confKey; | |||
int debuglevel; | |||
int logTimestamp; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you expect it to be anything other than true/false? (Like additional datetime formats)
echo "nwnx2 does not build on x64." | ||
echo "Try running this in a 32bit chroot." | ||
exit 1 | ||
export CC="gcc -m32" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like an unrelated change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm.. can I exclude this change from the PR? or does it have to be reverted in my repo and re-committed?
Apologies.. I've been working mostly on NWNX:EE and haven't paid this much
attention. Yes, the "logtimestamp" was a booean (either log it in the
standard format the server normally does, or don't log it at all).
And admittedly, the compile.sh change wasn't related but helped my sanity.
…On Wed, Mar 21, 2018 at 4:43 AM Victor Babenko ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In NWNXBase.h
<#124 (comment)>:
> @@ -114,6 +125,7 @@ class CNWNXBase
gline* nwnxConfig;
const char * confKey;
int debuglevel;
+ int logTimestamp;
Do you expect it to be anything other than true/false? (Like additional
datetime formats)
------------------------------
In compile.sh
<#124 (comment)>:
> @@ -3,12 +3,10 @@
set -e
if [ `uname -p` = "x86_64" ]; then
- echo "nwnx2 does not build on x64."
- echo "Try running this in a 32bit chroot."
- exit 1
+ export CC="gcc -m32"
This looks like an unrelated change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#124 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADgtqqB5qj49bSBqEnEVIxNnbUgOjrOdks5tgiC0gaJpZM4PPLUE>
.
|
I think it's better to store it as a bool then and use true/false. |
having multiple log files with non-timestamped entries makes correlating events between files difficult.
this change adds a simple [yyyy-mm-dd HH:MM:SS] timestamp at the beginning of each line logged to the various nwnx2 logfiles.