https://github.com/suda/console-panel
Read only log console panel package for Atom
https://github.com/suda/console-panel
Last synced: 8 months ago
JSON representation
Read only log console panel package for Atom
- Host: GitHub
- URL: https://github.com/suda/console-panel
- Owner: suda
- License: mit
- Created: 2015-10-09T17:46:39.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T22:06:19.000Z (over 3 years ago)
- Last Synced: 2025-08-13T06:45:20.556Z (10 months ago)
- Language: JavaScript
- Size: 337 KB
- Stars: 7
- Watchers: 12
- Forks: 4
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Atom Console package
**This isn't a terminal**. It's only a log console. Great for showing compilation output, long responses or general logs.

## Usage
By itself, the package doesn't do anything but it provides a service other packages can consume:
`package.json`
```json
"consumedServices": {
"console-panel": {
"versions": {
"^1.0.0": "consumeConsolePanel"
}
}
}
```
`main.coffee`
```coffeescript
consumeConsolePanel: (@consolePanel) ->
log: (message) ->
@consolePanel.log(message)
```
## API reference
When consuming console panel you'll get an instance of `ConsoleManager` which has the following methods:
###### toggle()
Toggles the console panel.
###### log(message, level='info')
Logs a message. `message` can be a `String` or a custom `View` that will be appended.
###### error(message)
Logs an error.
###### warn(message)
Logs a warning.
###### notice(message)
Logs a notice.
###### debug(message)
Logs an debug message.
###### raw(rawText, level='info', lineEnding="\n")
Logs a raw message. `rawText` will be split by `lineEnding` and each line will be added separately as `level`.
###### clear()
Clears the whole console.
###### stickBottom()
Stick to the bottom of the console panel (default).
###### stickTop()
Stick to the top of the console panel.
## TODO
* Write specs
* Add level filtering
* Show timestamp
* "Go to latest" button