Modify

Opened 7 years ago

Closed 7 years ago

#15277 closed defect (fixed)

fix JCS logging

Reported by: bastiK Owned by: team
Priority: normal Milestone: 17.09
Component: Core imagery Version:
Keywords: Cc: wiktorn

Description

If possible, the JCS library should be configured to use JOSM's logging system. Currently there is output which is formatted differently, but only for jar files build on the server. When running a local build, I do not get this output.

The setup in JCSCacheManager seems to have no effect. Findbugs complains about logger being garbage collected, but keeping a hard reference doesn't fix it.

Output at startup:

Using /usr/lib/jvm/java-9-openjdk-amd64/bin/java to execute josm-latest.
2017-09-09 11:31:22.291 INFO: Log level is at INFO (INFO, 800)
2017-09-09 11:31:23.458 INFO: Detected useable IPv6 network, prefering IPv6 over IPv4.
2017-09-09 11:31:30.653 INFO: GET https://josm.openstreetmap.de/wiki/StartupPage -> 200
2017-09-09 11:31:32.044 INFO: GET https://josm.openstreetmap.de/maps -> 200
[INFO] CompositeCacheManager - Instance is null, returning unconfigured instance
[WARN] ThreadPoolManager - No configuration settings found.  Using hardcoded default values for all pools.
[INFO] CompositeCacheManager - Setting default auxiliaries to null
[INFO] CompositeCacheManager - setting defaultCompositeCacheAttributes to [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 1000, maxSpoolPerRun = -1, diskUsagePattern = UPDATE, spoolChunkSize = 2 ]
[INFO] CompositeCacheManager - setting defaultElementAttributes to [ IS_LATERAL = true, IS_SPOOL = true, IS_REMOTE = true, IS_ETERNAL = false, MaxLifeSeconds = -1, IdleTime = -1, CreateTime = 1504949494755, LastAccessTime = 1504949494755, getTimeToLiveSeconds() = -1, createTime = 1504949494755 ]
[INFO] CompositeCacheConfigurator - Parsed regions []
[INFO] CompositeCacheManager - Finished configuration in 27 ms.
[INFO] CompositeCacheConfigurator - No special ElementAttribute class defined for key [jcs.region.TMS.elementattributes], using default class.
[INFO] AbstractDoubleLinkedListMemoryCache - initialized MemoryCache for TMS
[INFO] CompositeCache - Constructed cache with name [TMS] and cache attributes [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 0, maxSpoolPerRun = -1, diskUsagePattern = UPDATE, spoolChunkSize = 2 ]
[INFO] BlockDiskCache - Region [TMS_BLOCK_v2] Constructing BlockDiskCache with attributes 
BlockDiskAttributes 
 DiskPath [$HOME/.cache/JOSM-latest/tiles]
 MaxKeySize [524288]
 MaxPurgatorySize [5000]
 BlockSizeBytes [4096]
 KeyPersistenceIntervalSeconds [300]
 DiskLimitType [SIZE]
[INFO] BlockDiskCache - Region [TMS_BLOCK_v2] Cache file root directory: [$HOME/.cache/JOSM-latest/tiles]
[INFO] BlockDisk - Constructing BlockDisk, blockSizeBytes [4096]
[INFO] BlockDiskKeyStore - Region [TMS_BLOCK_v2] Cache file root directory [$HOME/.cache/JOSM-latest/tiles]
[INFO] BlockDiskKeyStore - Region [TMS_BLOCK_v2] Key File [$HOME/.cache/JOSM-latest/tiles/TMS_BLOCK_v2.key]
[INFO] BlockDiskKeyStore - Region [TMS_BLOCK_v2] Loading keys for $HOME/.cache/JOSM-latest/tiles/TMS_BLOCK_v2.key
[INFO] BlockDiskKeyStore - Region [TMS_BLOCK_v2] Set maxKeySize to: '524288'
[INFO] BlockDiskKeyStore - Region [TMS_BLOCK_v2] Loaded keys from [TMS_BLOCK_v2], key count: 488; up to 524288 will be available.
[INFO] BlockDiskCache - Region [TMS_BLOCK_v2] Block Disk Cache is alive.

Attachments (0)

Change History (7)

comment:1 by bastiK, 7 years ago

Cc: wiktorn added

comment:2 by wiktorn, 7 years ago

I guess this is already fixed. I've just build from local sources and got:

2017-09-10 00:19:21.895 FINE: initialized MemoryCache for TMS
2017-09-10 00:19:21.895 FINE: Constructed cache with name [TMS] and cache attributes [ useLateral = true, useRemote = true, useDisk = true, maxObjs = 0, maxSpoolPerRun = -1, diskUsagePattern = UPDATE, spoolChunkSize = 2 ]
2017-09-10 00:19:21.908 FINE: Region [TMS_BLOCK_v2] Constructing BlockDiskCache with attributes 
BlockDiskAttributes 
 DiskPath [C:\Users\user\AppData\Local\JOSM\cache\tiles]
 MaxKeySize [524288]
 MaxPurgatorySize [5000]
 BlockSizeBytes [4096]
 KeyPersistenceIntervalSeconds [300]
 DiskLimitType [SIZE]
2017-09-10 00:19:21.908 FINE: Region [TMS_BLOCK_v2] Cache file root directory: [C:\Users\user\AppData\Local\JOSM\cache\tiles]
2017-09-10 00:19:21.910 FINE: Constructing BlockDisk, blockSizeBytes [4096]
2017-09-10 00:19:21.911 FINE: Region [TMS_BLOCK_v2] Cache file root directory [C:\Users\user\AppData\Local\JOSM\cache\tiles]
2017-09-10 00:19:21.911 FINE: Region [TMS_BLOCK_v2] Key File [C:\Users\user\AppData\Local\JOSM\cache\tiles\TMS_BLOCK_v2.key]
2017-09-10 00:19:21.911 FINE: Region [TMS_BLOCK_v2] Loading keys for C:\Users\user\AppData\Local\JOSM\cache\tiles\TMS_BLOCK_v2.key
2017-09-10 00:19:21.912 FINE: Region [TMS_BLOCK_v2] Set maxKeySize to: '524288'
2017-09-10 00:19:21.918 FINE: Region [TMS_BLOCK_v2] Loaded keys from [TMS_BLOCK_v2], key count: 20; up to 524288 will be available.
2017-09-10 00:19:21.944 FINE: Region [TMS_BLOCK_v2] Block Disk Cache is alive.
2017-09-10 00:19:21.954 FINE: ukończono Uaktualnianie interfejsu użytkownika z  (306 ms)

Are you sure you have all source up to date?

PS. Setting breakpoint inside Handler will make you sure that is is actually used

comment:3 by bastiK, 7 years ago

In 12811/josm:

see #15277 - add hard reference to logger, else it gets garbage collected (findbugs warning)

comment:4 by bastiK, 7 years ago

Okay, now I understand that most of the JCS output being suppressed is how it is supposed to be (unless running with --debug or --trace). It works with local build, but not with the binary from the server (josm-latest.jar, r12794).

Let's see if [12811] makes a difference.

comment:5 by bastiK, 7 years ago

Not fixed. Can you test with josm-latest.jar?

comment:6 by Don-vip, 7 years ago

Milestone: 17.09

comment:7 by bastiK, 7 years ago

Resolution: fixed
Status: newclosed

Class org/apache/commons/logging/impl/Jdk14Logger.java was missing in the jar.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.