logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Schöning <tschoen...@am-soft.de>
Subject Re: How to find log file name?
Date Tue, 23 Aug 2016 06:00:32 GMT
Guten Tag Dave Birdsall,
am Dienstag, 23. August 2016 um 00:48 schrieben Sie:

> Suppose I am about to log some information to a log file. I’d like
> to tell my user where that log file is (the path and file name) so
> the user doesn’t have to hunt for it. Is there a programmatic way to obtain the log
file name?

This is the wrong approach. Ask yourself who implements log4cxx with
which behaviour into your application. Most likely it's you, else you
wouldn't be able to programmatically ask for the log file name/path.
So why do you implement it in a way that makes you need to ask for
such a log file name/path at all?

You don't want that, instead you want to provide the ability that you
or your user can simply configure those paths, so you don't need to
query anything. Read the following document, especially the
"Configuration" section. The format used is pretty much the same like
that of log4j, so you can use their documentation as well.


Mit freundlichen Grüßen,

Thorsten Schöning

Thorsten Schöning       E-Mail: Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

View raw message