https://github.com/scriptex/log
Dynamic console logging - log using the optimal console method. Provides method overwriting, beforeLog and afterLog hooks.
https://github.com/scriptex/log
console-log log logging
Last synced: 3 months ago
JSON representation
Dynamic console logging - log using the optimal console method. Provides method overwriting, beforeLog and afterLog hooks.
- Host: GitHub
- URL: https://github.com/scriptex/log
- Owner: scriptex
- License: mit
- Created: 2021-02-26T08:19:31.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-12T05:14:05.000Z (10 months ago)
- Last Synced: 2025-04-10T04:05:33.848Z (10 months ago)
- Topics: console-log, log, logging
- Language: TypeScript
- Homepage: https://atanas.info/portfolio/open-source/log
- Size: 290 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/scriptex/log/actions?query=workflow%3ABuild)
[](https://www.codacy.com/gh/scriptex/log/dashboard?utm_source=github.com&utm_medium=referral&utm_content=scriptex/log&utm_campaign=Badge_Grade)
[](https://codebeat.co/projects/github-com-scriptex-log-master)
[](https://www.codefactor.io/repository/github/scriptex/log)
[](https://deepscan.io/dashboard#view=project&tid=3574&pid=5257&bid=40799)
[](https://github.com/scriptex/log/)
# Log
> Dynamic console logging - log using the optimal console method.
> Provides method overwriting, beforeLog and afterLog hooks.
## Visitor stats




## Code stats





## Usage
```javascript
// String
log('string');
// number
log(1);
// array
log(['test', '1', { object: 'prop' }, ['array']]);
// function
log(() => {
const a = 1;
const b = 2;
return a + b;
});
// object
log({
prop1: 'value1',
prop2: {
nestedProp1: 'nestedValue1',
nestedProp2: 'nestedValue2',
nestedProp3: 'nestedValue3',
nestedProp4: 'nestedValue4'
},
prop3: 'value3',
prop4: 'value4'
});
// null
log(null);
// undefined
log(undefined);
log(void 0);
// boolean
log(true);
// RegExp
log(/^[a-z]{3,}$/);
// Date
log(new Date());
log(new Date().getTime());
// Symbol
log(Symbol('foo'));
// Constructor
log(function () {});
log(class A {});
log(Array);
log(Function);
log(new Function());
// Map
const map = new Map();
map.set('key1', 'value1');
map.set('key2', 'value2');
log(map);
// set
const set = new Set();
set.add('value1');
set.add('value2');
log(set);
```
## LICENSE
MIT
---
Connect with me:
---