title: Can Winston Logger be used on the front-end for logging?
body: <p>I am creating full mean stack app with </p>
  
  <blockquote>
    <p>NodeJs , Angular 6 , ExpressJs and MongoDB </p>
  </blockquote>
  
  <p>I have managed to create a server and its working perfectly, instead of using <code>console.log</code> when logging errors in my app I have decided to use <code>Winston Logger</code> here is what I have now </p>
  
  <blockquote>
    <p>Server side</p>
  </blockquote>
  
  <pre><code>var appRoot = require('app-root-path');
  var winston = require('winston');
  
  // define the custom settings for each transport (file, console)
  var options = {
      file: {
          level: 'info',
          filename: `${appRoot}/logs/app.log`,
          handleExceptions: true,
          json: true,
          maxsize: 5242880, // 5MB
          maxFiles: 5,
          colorize: false,
      },
      console: {
          level: 'debug',
          handleExceptions: true,
          json: false,
          colorize: true,
      },
  };
  
  // instantiate a new Winston Logger with the settings defined above
  const logger = winston.createLogger({
      transports: [
          new winston.transports.File(options.file),
          new winston.transports.Console(options.console)
      ],
      exitOnError: false, // do not exit on handled exceptions
  });
  
  // create a stream object with a 'write' function that will be used by `morgan`
  logger.stream = {
      write: function (message, encoding) {
          // use the 'info' log level so the output will be picked up by both transports (file and console)
          logger.info(message);
      },
  };
  
  module.exports = logger;
  </code></pre>
  
  <p><strong><em>Note: Winston in server side works perfectly</em></strong></p>
  
  <blockquote>
    <p>Client-Side</p>
  </blockquote>
  
  <p>I want to use winston in my client side angular 6 app .</p>
  
  <p>Example: in one of my components i have this.</p>
  
  <pre><code>import * as logger from "winston";
  .........
   this.activeRouter.params.subscribe((params) =&gt; {
        // tslint:disable-next-line:prefer-const
        let id = params['id'];
        this.moviesService.getReview(id)
          .subscribe(review =&gt; {
            console.log(review);
            this.review = review;
          });
      });
  </code></pre>
  
  <p>As you can see I am using <code>console.log(review)</code> , Instead of console log I would like to use <code>Winston</code> .</p>
  
  <p>How to use <code>Winston logger</code> in client-side ?  am newbie to all this stuff any help will be apreciated.</p>