Default log levels in Log4view

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Default log levels in Log4view

Vladimirs
It doesn't seems like log4view topics are popular on SO, hence I am duplicating my question here:

In logs that I have to frequently work with all warning messages has log level of Warning which doesn't match to Warn from predefined log4view log level and log4view learns Warning and defaults it's severity to Info.

In order to view my Warning messages properly I have to edit configuration and increase that severity as well as modify colouring scheme. However I have to do it per each receiver, which is a bit annoying when you need to review loads of different log files.

So I am looking for some default configuration which I can edit once and it will be applied to every new receiver.

However some config files I found (..\Program Files (x86)\Log4View\Log4View.exe.config or ..\AppData\Local\Prosa\Log4View.exe_StrongName_iip5vmgqywfkl4udjzgcyf2d1mnn3upk\12.5.6.0\user.config) as well as a part of registry that I looked at seems doesn't contain that information.

Is there any workaround for that?

http://stackoverflow.com/questions/28984004/how-to-configure-default-log-levels-in-log4view
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Philipp Lauchner
Administrator
Dear Vladimirs,

each receiver uses the same configuration where custom log levels are defined. Yet there was a bug, where those level values would not be loaded at start up under certain configuration setups.
We just released a new version (12.5.8) with a fix included. Feel free to check if this solves your problem and do not hesitate to contact us again if you encounter further problems.

Philipp Lauchner
PROSA GmbH
Development & Support
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Vladimirs
Dear Philipp,

Thank you, I just checked and seems your fix is working, however I can already see a little issue here: when you add a new receiver it resets styling for that log level (so before I configured my WARNING log level to have Tahoma 8.25 Pt. Font and 255, 128, 0 Forecolor and after I added new receiver it reset this setting to default values for all receivers)

Thanks,
V
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Philipp Lauchner
Administrator
Dear Vladimirs,

I just tried to recreate your problem, but I had no luck. I did the following:

- Start Log4View, define the "WARNING" level and customize its font/color
- Open a log file, WARNING messages are displayed correctly
- Adding another receiver, WARNING messages are still represented correctly
- Close Log4View, save configuration
- Restart Log4View, WARNING messages are still displayed correctly
- Adding a third receiver, still everything is fine
- Remove all receivers, adding a new one, WARNING messages are again shown correctly

Am I missing a point? Could you send me detailed steps that cause your problem?

Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Vladimirs
Hi Philipp,

Sorry, for delayed response.

Your steps are correct, however I am having different result. I recorded a video showing that issue.]

Thanks,
V
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Philipp Lauchner
Administrator
Dear Vladimirs,

that's very strange, I followed your exact steps in the video, yet everything works fine for me. Are you using our latest version 12.5.8? Does this also happen once you start working with a clear new configuration?

Sincerely yours

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Vladimirs
Hi Philipp,

Strange, indeed. On video it was 12.5.8, also tried with 12.5.9 and managed to replicate same with a clear new configuration as well as with an existing one.

Regards,
V
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Philipp Lauchner
Administrator
Dear Vladimirs,

I think I finally figured out your problem. You are using Log4View's File Extension Scheme Feature (see also http://www.log4view.com/fileadmin/user_upload/Log4ViewHelp/Configuration.html).

When you open a log file ending with .txt, a previously saved configuration will be loaded, as you selected "Save Settings for txt files" when you added a .txt file previously. Yet the format settings for your custom log level have not yet been saved to that specific configuration.

To fix your problem, eighter add a .txt file, set the format for WARNING and click File -> Save File Extension Scheme -> OK or disable File Extension Schemes for .txt files by holding the Ctrl-Key while adding a .txt file and select "Always show Dialog" in the File Receiver dialog.

Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Vladimirs
This post was updated on .
Hi Philipp,

Saving file extension scheme worked, however now I cannot open some of my old logs files even holding CTRL, it says:
Error at OpenFile

An item with the same key has already been added.


And I cannot see anything relevant in Log4View.xlog.

As a workaround I have to change file extensions of my log files in order to load them.

So now I have following questions:

1) How I can clear File Extension Scheme - I can see only import, but no clear/export;
2) How I can configure log4view to persist default log levels and styles for ANY log file extension;

Regards,
V
Reply | Threaded
Open this post in threaded view
|

Re: Default log levels in Log4view

Philipp Lauchner
Administrator
Dear Vladmimirs,

Regarding 1):
We think about adding a better way to manage extension schemes in our future releases.
In the meantime to remove your file extension schemes, you can navigate to C:\Users\<Username>\AppData\Roaming\Log4View. Here you find all extension schemes saved as <Extension>.l4v, you can remove them here.

Regarding 2):
When saving your general configuration (autosave is enabled by default), all these settings will be applied to any extension, as long as there is no scheme defined for it. An existing scheme would again override the general configuration.

Yours sincerely

Philipp Lauchner
PROSA GmbH
Development & Support