doublep / logview

Emacs mode for viewing log files
GNU General Public License v3.0
153 stars 18 forks source link

[Help] Unable to determine the log format #41

Closed abhi18av closed 3 years ago

abhi18av commented 3 years ago

Hi @doublep ,

Thanks for the wonderful package!

Recently, I have started analyzing the Nextflow logs, https://pastebin.com/j2sGLY7K , but I was not able to set it up with logview.

The logging framework used in Nextflow is slf4j as mentioned here https://github.com/nextflow-io/nextflow/blob/b3e2cdde5edc6152dbd0a38a571f0de5099ccb89/modules/nextflow/build.gradle#L24

I'd love to be able to rely upon logview to make my life simpler. Could you please help me out?

doublep commented 3 years ago

Hi,

Try adding a custom timestamp format with Java pattern MMM-dd HH:mm:ss.SSS to additional timestamp formats (open any log file and type o S).

abhi18av commented 3 years ago

Yup, using the following snippet I was able to get the color coding right


(setq logview-additional-timestamp-formats
      '(("MMM-dd HH:mm:ss.SSS"
         (java-pattern . "MMM-dd HH:mm:ss.SSS"))))

Is there a way I could highlight/filter based on the following -thread name [Task monitor]

Dec-16 19:23:44.249 [Task monitor] DEBUG nextflow.processor.TaskRun - Unable to dump error of process 'null' -- Cause: java.nio.file.NoSuchFileException: /tmp/temp-s3-191216344016854499/.command.err

Dec-13 11:52:28.943 [AWSBatch-executor-99] DEBUG n.c.aws.batch.AwsBatchTaskHandler - [AWS BATCH] submitted > job=88093aec-c635-4bf8-ae92-20c4052a80ba; work-dir=s3://cape-results-gds/_nextflow/runs/f0/6d817eccba5b19abca6d0410801fc1

UPDATE:

I guess, this is a standard format for SLF4J and I have relied on the following snippet to define a new submode


(setq logview-additional-submodes
      '(("Nextflow"
         (format . "TIMESTAMP [THREAD] LEVEL - NAME - MESSAGE")
         (levels . "SLF4J"))))

Is it possible to filter based on Name etc?

abhi18av commented 3 years ago

Actually, I have now understood how filtering works and this is brilliant!

Thanks mate for working on this package. I'm closing this issue as it's now resolved.