[PATCH v1] show OSM source file name in log messages

The attached patch adds the OSM source file name into log messages so if you are processing multiple files, you know which file each message relates to. The file name (plus a ':' suffix) is inserted between the message type/class and the message itself. Please test, especially if using multiple jobs. Mark

Hi Mark
The attached patch adds the OSM source file name into log messages so if you are processing multiple files, you know which file each message relates to.
There is a ThreadLocal class specially for keeping values on a per-thead basis, as in the attached modification to your patch. With your code there is a slight chance that there will be a problem if a value is set at exactly the same time as the tag is being accessed. ..Steve

Hi Steve,
There is a ThreadLocal class specially for keeping values on a per-thead basis, as in the attached modification to your patch.
Thanks, I was not aware of that class.
With your code there is a slight chance that there will be a problem if a value is set at exactly the same time as the tag is being accessed.
Yes, it should have had synchronized blocks around the map access - silly me. Mark
participants (2)
-
Mark Burton
-
Steve Ratcliffe