oresoftware / bunion Goto Github PK
View Code? Open in Web Editor NEWBunyan's weird cousin. Has foot issues.
License: MIT License
Bunyan's weird cousin. Has foot issues.
License: MIT License
The user should be able to tell the program when to do log rotation upon command
Take most recent 25% of bytes from current file, copy to new file, and then start over.
{
"producer": {
"appName": "oplog-server",
"level": "info"
}
}
bxn, b4n, bunion
bunion = b1234n
the following command:
bxn node dist/test/controlled-test.js
causes this after you hit return a few times:
oleg@xps:~/codes/oresoftware/bunion$ bxn node dist/test/controlled-test.js
bunion consumer info: Handing user keyboard input b/c stdout is a TTY.
bunion error: Internal error: object should always be defined.
bunion error: Internal error: object should always be defined.
bunion error: Internal error: object should always be defined.
bunion error: Internal error: object should always be defined.
tab finds previous match
g should be: goto line
spacebar can be previous match
haskell, ocaml, etc
'use strict';
import {BunionLogger} from 'bunion';
export const log = new BunionLogger({appName: 'cdt-api'});
ctrlshiftR
something like this:
bunion --start=time --end=time
I think the start point is more useful than end point
Would be nice if like so:
module.exports = bunyan.createLogger({
name: 'cdt-api-server',
levels: {
'warn' : [],
'debug': [],
}
});
SInce there is a tcp server in the consumer, potentially can stream JSON there (from multiple processes).
log.Info = () => {
const d = process.domain;
let userId = d.req && d.req.loggedInUserId;
// use userId in logs
};
ctrl-l or clear
should clear the screen and put into reading mode
this error is caused when hitting ctrl b
Fri, 17 Apr 2020 01:16:00 GMT app:cm:html-to-pdf INFO listening on port: 3701
Line # 2, mode: SEARCHING, Log level: 1, no search term. bunion consumer warning: Could not parse:
bunion consumer warning: Parse error was: SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at readFromFile (/home/oleg/codes/channelmeter/html-to-pdf/node_modules/bunion/dist/consumer/cli.js:122:22)
at gotoLine (/home/oleg/codes/channelmeter/html-to-pdf/node_modules/bunion/dist/consumer/cli.js:251:49)
at ReadStream.<anonymous> (/home/oleg/codes/channelmeter/html-to-pdf/node_modules/bunion/dist/consumer/cli.js:532:13)
at ReadStream.emit (events.js:311:20)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
at ReadStream.Readable.push (_stream_readable.js:209:10)
at TTY.onStreamRead (internal/stream_base_commons.js:186:23)
as an example:
echo '
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /styles/font-awesome-4.7.0/css/font-awesome.min.css
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /styles/custom-supply-chain.css
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /scripts/common/jquery-3.3.1.js
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /scripts/common/bootstrap.min.js
' > (bunion --slice-from-first-index ':')
or:
echo '
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /styles/font-awesome-4.7.0/css/font-awesome.min.css
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /styles/custom-supply-chain.css
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /scripts/common/jquery-3.3.1.js
entity-tools-integration-64f7bc9666-wnkmg: new request: GET /scripts/common/bootstrap.min.js
' > (bunion --slice-first-index ' ') # first index of whitespace
bunion --light
or
bunion --dark
for different terminals
usage like:
const s = Symbol('bunion-meta')
log.Info = (x) => {
const meta = process.domain && process.domain[s]
const metaTotal = Object.assign({}, x, meta);
}
the current domain stores meta info to be logged.
Right now we say "(current end of file)"
but if stdin has ended, we can flip a boolean and say:
(end of file - stdin has ended)
import {log as parentLogger} from 'cdt-core/loggers/cdt-api';
const log = parentLogger.child({varoom: true});
log.debug({zoom:'roa', con: {zoom:'roa', foo: {zoom:'roa'}, bar: {zoom:'roa', baz: {zoom:'roa'}}}});
use absolute filepath along with process.cwd() to locate .bunion.json
If there is an error instance, we should do like so:
console.log(JSON.stringify({
type: 'Error',
value: {
message: e.message,
stack: e.stack
}
}))
We need to support:
bunion --fd=/dev/stdin
it goes like this:
process.stdin.resume().pipe(new JSONParser()).pipe(bunionTransform()).on('data', d => {
});
the bunionTransform will transform non-Bunion-JSON to Bunion-JSON.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.