Log Console Package


#1

Hey, I create a package Log-Console, a IDE like console for atom. It tail a log file and can jump to file by parse log or stackstrace.

Full stack engineer or server engineer should like it :smile:

https://atom.io/packages/log-console
Looking forward to your feedback! :sunglasses:


#2

Wondering if this should be a node.js package like atom-message-panel rather than an atom package directly. I do see great utility in something like this (I kind of use atom-message-panel in this way), and it would be something I would like to eventually see provided in the core.


#3

Update date the topic. I did not explan clearly. It mainly tail a log file in atom and jump to file by direct click.


#4

The atom-message-panel package is indeed a node.js package. But this package is not.
For example, I can use this package to tail gameserver log and unity3d log on runtime. Web developer can tail nginx or apache or php log.

This package ideal from unity3d console enhanced package.


#5

Gotcha. Thereโ€™s still some core concepts in this and atom-message-panel which would be fantastic to have in a core component (a [bottom, by default] โ€˜panelโ€™ with info, warning, error messages that optionally tie back to file, line, column.

Your package allows filtering / turning on/off of each category, which made me think its scope was larger.


#6

Also have a better ui that atom-message-panel, which is a little ugly. My UI is base on Unity3d and https://github.com/atom/notifications


#7

I agree, atom-message-panel needs a UX overhaul.


#8

Can it jump to a source file in atom from a chrome inspector error in atom? That is an IDE kind of thing and it would be very useful.


#9

This package is a common log console, so it can not do it directly, only if there a log file.
I thought this feature should support by atom-notifications package.
Or you can use my atom init script:

{$, Point} = require 'atom'
open = (href, lineNumber, colNum) ->
  atom.workspace.open(href).done ->
    return unless lineNumber >= 0
    if textEditor = atom.workspace.getActiveTextEditor()
      position = new Point(lineNumber, colNum)
      textEditor.scrollToBufferPosition(position, center: true)
      textEditor.setCursorBufferPosition(position)
      textEditor.moveToFirstCharacterOfLine()

$(document.body).on 'click', 'atom-notifications .line', (event)->
  text = event.target.innerText
  group = text.match(/\/.*:\d+/)
  return unless group
  group = group[0].split(":")
  open(group[0], group[1]-1)

#10

BTW I pull a request for this: https://github.com/atom/notifications/pull/16