<?php

namespace App\Lib;


use Illuminate\Support\Facades\Log;

class SentryLog
{
    public static function addLog($message,$level = null){


        if(is_array($message)){
            $message = json_encode($message);
        }

        if (app()->bound('sentry')) {

            app('sentry')->captureMessage($message);

        } else {

            Log::channel('single')->info($message);

        }

    }


}