Request to add simple but meaningful logging to each Adam command

Theo Jager 2 years ago in ADAM Core • updated 2 years ago 0

When an Adam command is executed it depends on the internal code whether logging information is printed in the Adam Application log or not. 
Specifically for organizations who use the logs (depending on success, failure or keywords) for automated actions or reports, it is necessary to have at least simple but meaningful logging available.


Not sure what you want. Do you want more info? Or do you want to filter the info?

If you want to filter the info, you can modify the config file of the commandline (Adam.Core.Commandline.exe.config). This section is the one you need to modify:

<add type="Adam.Tools.LogHandler.ConsoleLogListener, Adam.Tools" severity="Normal" displayAdditionalInfo="false"/>
<add type="Adam.Tools.LogHandler.EventLogListener, Adam.Tools" severity="Error"/>

It allows you to filter, but you could also write your own listener that writes the logs to wherever you want them to log. More info can be found in this post on the knowledgebase:


Thanks, Nik!

This request is about those commands which don't log anything, like:

     Adam.Core.CommandLine.exe RegisterAssembly -registration=PN_INT -UserName=Administrator -password=XXXX -assembly="\\PATH\Name.dll"

Only "Logged on" and 'Logged off" is printed in the Adam Application log, and that doesn't make sense without information about the assembly name or path.

Only thing I can say is: you could create your own commandline. It's not that difficult and most things are publicly available. You could then use LogManager.Write(); and config your commandline to write to both the console and the database.

BTW: I now get what you mean by "log". I thought you meant logging to the console, but you mean to the LogManager (and the Application log in particular). Apparently ADAM is inconsistent in writing its messages. I would expect them to do LogManager.Write(); all the time instead of writing to the console directly. So configuration will not help you sufficiently.

Thanks again for finetuning, Nik ;-)
Yes, my request is actually about 'consistency' in writing messages to the Application log. Logging should be reliable and offer usable information in every piece of ADAM code.