Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Scope all Log::* messages to a Map object #882

Closed
kkaefer opened this issue Feb 14, 2015 · 3 comments
Closed

Scope all Log::* messages to a Map object #882

kkaefer opened this issue Feb 14, 2015 · 3 comments
Labels

Comments

@kkaefer
Copy link
Member

kkaefer commented Feb 14, 2015

We are currently using global log messages, which makes it hard to find out what messages belong to which map object. Instead, we should associate these log messages with a particular Map object.

@ljbade
Copy link
Contributor

ljbade commented Feb 14, 2015

Perhaps at the same time do #613

@mikemorris
Copy link
Contributor

👍

@kkaefer
Copy link
Member Author

kkaefer commented Mar 3, 2015

More background: Our Log::* output on a global level. When using multiple Map objects in one process, it's impossible to tell which Map object (or FileSource object) a log message is from. This makes it impossible to associate any errors with the correct object. In addition to that, many log messages should probably be turned into some sort of errors. Not sure if an additional error reporting facility is out of scope for this issue though.

@tmpsantos tmpsantos self-assigned this Mar 3, 2015
tmpsantos added a commit that referenced this issue Mar 17, 2015
To make it easier to debug, add the Environment ID and the Thread name
to the log messages. For instance log messages from the TileParser will look like:

[WARNING] {0}{TileWorker_15/18653/9486}[ParseTile]: some relevant warning message
   |       |             |                  |
   |       |             |                  +-> Component
   |       |             +--------------------> Thread name
   |       +----------------------------------> Environment ID
   +------------------------------------------> Severity level

Log messages that are not inside an Environment::Scope will work
normally and will look like:

[WARNING] [JNI]: some relevant warning message

Fixes #882.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants