www.digitalmars.com         C & C++   DMDScript  

c++.stlsoft - multiple application name/identity

reply Stanislav <digital.stream.of.mind gmail.com> writes:
How can i use multiple application name/identity for different parts
of project. Application is a single file. It doesn't consist of
several dynamic libraries.

For example, i want something like this:
[corelib, 11.07.2008 11:25:24.486; Notice]: stmt 1
[corelib, 11.07.2008 11:25:24.486; Notice]: stmt 2
[xmllib, 11.07.2008 11:25:24.486; Debug]: stmt 3
Jul 10 2008
next sibling parent Matthew <no-one nowhere.none.none> writes:
Apologies for not replying earlier.

I'll be in a position to answer more properly in 3-4 days' time. For the
moment, the short answer is that such behaviour is not supported by the stock
back-ends provided with Pantheios, but it would be readily achieved by custom
front-/back-ends. (In fact, something similar was implemented earlier this year
for a client - see http://pantheios.sourceforge.net/essentials.html, item 8 -
who requested a commercial customisation.)

I'll explain more next week.

Cheers

Matt
Jul 19 2008
prev sibling parent "Matthew Wilson" <matthew hat.stlsoft.dot.org> writes:
Sorry about the long delay.

The answer to this is, simply, that the stock back-ends supplied with Pantheios
do not support this functionality, and there're no
current plans to add that support.

One of the design parameters of Pantheios is that it is intended to be used on
top of existing logging libraries where logging
formatting/outputting requirements are sophisticated.

I'd suggest having a go at adapting it to work with log4???. Alternatively, you
might consider writing the library identifiers as
the first element in the log statement, as in:

  const char LibId_Xml[] = "xmllib: ";

  . . .

  pantheios::log_Debug(LibId_Xml, "stmt 3");


which you give you output such as

    "[my-app-name, 11.07.2008 11:25:24.486; Debug]: xmllib: stmt 3"

this is almost equivalent, and is just as parsable by logging analysis tools.

HTH

If you really want to have exactly what you've expressed, we could write a
custom back-end for you, on a commercial basis. If so,
contact me via http://www.synesis.com.au/contact.html and we can go from there.

Cheers

Matt


"Stanislav" <digital.stream.of.mind gmail.com> wrote in message
news:g56rsc$1n1m$1 digitalmars.com...
 How can i use multiple application name/identity for different parts
 of project. Application is a single file. It doesn't consist of
 several dynamic libraries.

 For example, i want something like this:
 [corelib, 11.07.2008 11:25:24.486; Notice]: stmt 1
 [corelib, 11.07.2008 11:25:24.486; Notice]: stmt 2
 [xmllib, 11.07.2008 11:25:24.486; Debug]: stmt 3
Sep 26 2008