/*
* Copyright (c) Akveo 2019. All Rights Reserved.
* Licensed under the Personal / Commercial License.
* See LICENSE_PERSONAL / LICENSE_COMMERCIAL in the project root for license information on type of purchased license.
*/

using Serilog;
using System;
using ILogger = Common.WebApi.ILogger;

namespace Common.WebApi
{
    public class Logger : ILogger
    {
        public void LogError(string message, int userId, Exception ex = null)
        {
            Log.Logger.ForContext("UserId", userId).Error(ex, message);
        }

        public void LogInfo(string message, int userId)
        {
            Log.Logger.ForContext("UserId", userId).Information(message);
        }
    }
}