import { Environment } from '../models/configuration/environment';
import nonstop from '../nonstop';

class LogService {
    public static sharedInstance = new LogService();

    public logError(message: string) {
        if (console && console.error) {
            console.error(message);
        }
    }

    public logInfo(message: string) {
        if (nonstop.config.environment !== Environment.Production && console && console.info) {
            console.info(message);
        }
    }

    public log(message: string) {
        if (nonstop.config.environment !== Environment.Production && console && console.info) {
            console.log(message);
        }
    }
}

export default LogService.sharedInstance as LogService;