This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import chalk from 'chalk'; | |
import moment from 'moment'; | |
import fs from 'fs-extra'; | |
import path from 'path'; | |
/* | |
* Easy custom logger to save logs in date wise file in DD-MM-YYYY.txt. | |
* dependencies: chalk, moment, fs-extra | |
* Author: Rohit Mahto | |
* Github: https://github.com/rohit267 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import winston from 'winston'; | |
import { AzureBlobTransport } from 'winston-azure-transport'; | |
import moment from 'moment-timezone'; | |
const { combine, printf, colorize } = winston.format; | |
/** | |
* | |
* RSGI-LOGGER WITH AZURE FILE STORAGE TRANSPORT | |
* Will store logs in journey wise and date wise. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add these lines to your .bashrc or .zshrc | |
function checkIfWorkDir(){ | |
if [[ $PWD == *"rohitmahto/work"* ]]; then | |
echo "Work flder found." | |
git config user.name rohit-work | |
git config user.email [email protected] | |
echo "Git user name and email set to work account." | |
else | |
echo "Using Global Git Config." | |
fi |