Project

General

Profile

Actions

Feature #415

closed

Log-Ausgabe des Source-Dateinamens enthält u. U. den kompletten Pfad

Added by Jörg Riesmeier over 13 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Uli Schlachter
Category:
Library
Target version:
-
Start date:
2012-05-10
Due date:
% Done:

0%

Estimated time:
Module:
oflog
Operating System:
Compiler:

Description

Die Ausgabe unter Windows sieht z. B. wie folgt aus:

2012-05-09 16:24:27.105 DEBUG - wlcedb / ..\..\..\dcmtk_all_20120509\dcmwlmxl\apps\wlcedb.cc:308 - $dcmtk: wlmscpdb v3.6.1 2012-05-09 $
2012-05-09 16:24:27.105 DEBUG - wlcedb / ..\..\..\dcmtk_all_20120509\dcmwlmxl\apps\wlcedb.cc:308 - 

Unter Linux erscheint nur bei Header-Dateien der relative Pfad zur jeweiligen Datei:

2012-05-10 10:21:29.622 DEBUG - dcmimgle - didocu.cc:125 - transfer syntax of DICOM dataset: Little Endian Explicit (1.2.840.10008.1.2.1)
2012-05-10 10:21:29.622 DEBUG - dcmimgle - ../include/dcmtk/dcmimgle/diinpxt.h:434 - reading uncompressed pixel data completely into memory
2012-05-10 10:21:29.623 DEBUG - dcmimgle - ../include/dcmtk/dcmimgle/diinpxt.h:499 - convert input pixel data: case 2a (simple mask)
2012-05-10 10:21:29.628 DEBUG - dcmimgle - diimage.cc:612 - detach pixel data
2012-05-10 10:21:29.632  INFO - dcm2pnm  - dcm2pnm.cc:1540 - cleaning up memory

Frage: Soll das so bleiben? Es sieht ja irgendwie unschön aus ...


Files

just_filename.patch (826 Bytes) just_filename.patch Change the %l pattern to only print the file name Uli Schlachter, 2012-08-24 12:01
Actions #1

Updated by Jörg Riesmeier about 13 years ago

Man könnte natürlich die letzte Namenskomponente (nach evtl. vorhandenem PATH_SEPARATOR) von '__FILE__' abtrennen, etwa mit strrchr() oder OFStandard::getFilenameFromPath().

Actions #2

Updated by Uli Schlachter about 13 years ago

The attached patch makes oflog only print the file name and not the full path, as given by FILE. I'm unsure about comitting this, because this would be one more difference between our code and upstream log4cplus. I'll see if something like this can be added directly to log4cplus.

Actions #3

Updated by Jörg Riesmeier about 13 years ago

  • Category set to Library
  • Status changed from New to Assigned

It seems that there is already an official solution for this (using pattern "%b"): http://sourceforge.net/tracker/?func=detail&aid=3537695&group_id=40830&atid=429076

Actions #4

Updated by Uli Schlachter over 12 years ago

  • Status changed from Assigned to Closed

Now that we use log4cplus 1.1.0, pattern %b is available and can be used.

Actions

Also available in: Atom PDF