We can issue messages to the AssemblyLine's configured loggers at any time using JavaScript, at any point where scripting is possible (hooks, script components, and so on.) The explicit logmsg() calls available to you (that is, task.logmsg() & main.logmsg()) can have an optional string parameter indicating the Log4J level at which the messages are to be logged. Default is INFO. If the log-level given by the user is invalid for Log4J, the message is logged at DEBUG level. Levels include DEBUG, INFO, WARN, ERROR, FATAL.
If we use
task.logmsg()
your messages will be logged along with the other messages from the AssemblyLine. If you are running your AssemblyLine from the Configuration Editor, that will be in the CE output window. If your AssemblyLine also uses other logging methods, the messages will be there too.
When we use
main.logmsg()
your message will be logged along with other messages from the Config Instance. This will be in the log file(s) or other loggers created by the Config Instance, which are typically not seen in the Configuration Editor.