Coder Social home page Coder Social logo

bunion's People

Contributors

amills-vibeirl avatar oresoftware avatar the1mills avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

bunion's Issues

create child logger

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'}}}});

create bunion transform

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.

ctrl b causes error

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)

bunion.json file

{
  "producer": {
    "appName": "oplog-server",
    "level": "info"
  }
}

bunion filter by date

something like this:

bunion  --start=time --end=time  

I think the start point is more useful than end point

we can stream to tcp

SInce there is a tcp server in the consumer, potentially can stream JSON there (from multiple processes).

create new logger

'use strict';

import {BunionLogger} from 'bunion';
export const log = new BunionLogger({appName: 'cdt-api'});

bxn

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.

slice from beginning of line

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

store userId info, etc on process.domain

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.

Create command to switch out log files

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.