Opening a log file using Ideolog

Answered

How to open a .log file using Ideolog plugin? When dropped into IntelliJ the file is being opened by a default editor, although Ideolog is installed and enabled. Thanks!

0
11 comments
Official comment

Can you please tell me your IDEA and Ideolog versions? IDEA version can be found in Help -> About, and plugin version can be found in settings (Plugins).

If your log is of a custom format, you'll also have to setup this format in plugin settings (Editor -> Log Highlighting in settings tree), see https://github.com/jetbrains/ideolog/wiki for details.

Have you tried File | Open? Or drag the file into IDE Editor? Works just file for me.

0

IDEA 2017.3.4 173.4548.28 (January 28th ). The plugin's version is 173.0.7.0. After uninstalling/installing of the plugin the plugin's icon appeared on the editing tab, which probably means that the plugin is running. However i still cannot see the Ideolog popup menu and the only highlighted text in the log is the code of the exceptions. Do I need to do anything special to enable Ideolog's popup menu? The log is generated by slf4j logger, which is used by a typical Spriing Boot application (a couple snippets of the log below). Thanks!

2018-02-19 11:20:51.409  INFO 22004 --- [HttpClient@1322324712-266] com.ibm.orchestrator.messagebus.Context  : Proxy {"this":"com.ibm.orchestrator.engines.Chuck@309e1c24","model":"es-ES_BroadbandModel","class":"Chuck"} connected
2018-02-19 11:20:51.409 INFO 22004 --- [Thread-116] com.ibm.orchestrator.engines.Chuck : STT Proxy spent 428 milliseconds to establish ws connection with Chuck
2018-02-19 11:20:56.241 INFO 22004 --- [HttpClient@1129221498-120] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:56.538 INFO 22004 --- [HttpClient@1129221498-118] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:56.732 INFO 22004 --- [HttpClient@1129221498-121] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:56.835 INFO 22004 --- [HttpClient@1129221498-120] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:56.937 INFO 22004 --- [HttpClient@1129221498-114] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:56.970 INFO 22004 --- [HttpClient@1129221498-121] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:57.190 INFO 22004 --- [HttpClient@1129221498-120] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:57.451 INFO 22004 --- [HttpClient@2048945058-276] com.ibm.orchestrator.engines.ChuckTTS : ChuckTTS::onConnect com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45 session=WebSocketSession[websocket=JettyAnnotatedEventDriver[com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45],behavior=CLIENT,connection=WebSocketClientConnection@fda23570[ios=IOState@2bc84976[CONNECTED,!in,out],f=Flusher[queueSize=0,aggregateSize=0,failure=null],g=Generator[CLIENT,validating],p=Parser@2ff7c8d7[ExtensionStack,s=START,c=0,len=0,f=null]]<-DecryptedEndPoint@6af5434d{stream.watsonplatform.net/169.48.115.62:443<->/192.168.0.5:54405,OPEN,fill=-,flush=-,to=39/300000}->WebSocketClientConnection@fda23570[ios=IOState@2bc84976[CONNECTED,!in,out],f=Flusher[queueSize=0,aggregateSize=0,failure=null],g=Generator[CLIENT,validating],p=Parser@2ff7c8d7[ExtensionStack,s=START,c=0,len=0,f=null]]->SocketChannelEndPoint@323fc72f{stream.watsonplatform.net/169.48.115.62:443<->/192.168.0.5:54405,OPEN,fill=-,flush=-,to=2/300000}{io=0/0,kio=0,kro=1}->SslConnection@5bd5abe7{NOT_HANDSHAKING,eio=-1/-1,di=-1}=>WebSocketClientConnection@fda23570[ios=IOState@2bc84976[CONNECTED,!in,out],f=Flusher[queueSize=0,aggregateSize=0,failure=null],g=Generator[CLIENT,validating],p=Parser@2ff7c8d7[ExtensionStack,s=START,c=0,len=0,f=null]],remote=WebSocketRemoteEndpoint@4af5713a[batching=true],incoming=JettyAnnotatedEventDriver[com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45],outgoing=ExtensionStack[queueSize=0,extensions=[],incoming=org.eclipse.jetty.websocket.common.WebSocketSession,outgoing=org.eclipse.jetty.websocket.client.io.WebSocketClientConnection]]
2018-02-19 11:20:57.451 INFO 22004 --- [Thread-46] com.ibm.orchestrator.engines.ChuckTTS : #####ChuckTTS::synthesize _session.getRemote(), elapsed=390, message=Cinco cinco
2018-02-19 11:20:57.553 INFO 22004 --- [HttpClient@1129221498-118] com.ibm.orchestrator.messagebus.Context : ChuckCallback::onText push to CR with springsession=StandardWebSocketSession[id=0, uri=/hospitality/api/v1/recognize]
2018-02-19 11:20:57.921 INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession : sendMessage {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}
2018-02-19 11:20:57.923 INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession : sent binary with prefix {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}
2018-02-19 11:20:57.975 INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession : sendMessage {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}
2018-02-19 11:20:57.977 INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession : sent binary with prefix {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}

2018-02-19 11:22:55.585  INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession           : sent binary with prefix {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}
2018-02-19 11:22:55.586 INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession : sendMessage {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}
2018-02-19 11:22:55.586 INFO 22004 --- [Thread-34] c.i.o.websocket.GenericSession : sent binary with prefix {"id":"{\"this\":\"com.ibm.orchestrator.engines.ChuckTTS@5e4c8d45\",\"class\":\"ChuckTTS\"}","type":"ENGINETYPE_TTS","nodeid":"tts1"}

 

0

Yes, you need to specify the log format in plugin settings. To do that, open the settings dialog, then navigate to Editor -> Log Highlighting in the settings tree. You can specify your log format there. See https://github.com/JetBrains/ideolog/wiki/Custom-Log-Formats for more info on how to do that.

0

Thanks, By going another way around, can you suggest a ConversionPattern for sl4j Ideolog will understand out of the box? 

Just as an example a ConversionPattern: log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %5p %c{1}:%L - %m%n

 

0

Ideolog comes with a pattern for Rider log files as one of the examples.

The conversion pattern is %d{HH:mm:ss.SSS} | %-5p | %-30c{1} | %m%n

 

0

The highlighting works. But we need a way to grep by log levels. With long log files just highlighting is not very useful.

0

Egor Klepikov I'm aware of grep console. But in this case we open log file in Editor, so the Grep Console is irrelevant. Right?

0

But in this case we open log file in Editor, so the Grep Console is irrelevant. Right?

Yes. As a solution, I can recommend you configure External Tool in the IDE that will open the currently opened file in another editor which allows logs grepping. Please see https://stackoverflow.com/a/13421592/12844632

0

Egor Klepikov Not sure how External Tool is related, but I found the solution. There is an existing action to "Tail file in Console..." which gives us the ability to grep the file. But this is unrelated to "ideator" plugin. And now I'm not sure about the possible advantages of Ideator plugin compared to Grep Console.

0

Please sign in to leave a comment.