Debug() public méthode

public Debug ( string message ) : void
message string
Résultat void
Exemple #1
0
        public void Configuration(IAppBuilder app)
        {
            ILogger logger = new Logger();
            logger.Debug("Starting Israel Hiking Server.");
            var config = new HttpConfiguration();
            WebApiConfig.Register(config);

            config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));
            config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
            config.Formatters.JsonFormatter.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.None;
            config.Services.Add(typeof(IExceptionLogger), logger);
            config.DependencyResolver = new UnityResolver(RegisterUnityTypes(logger));

            app.UseWebApi(config);
            logger.Debug("Israel Hiking Server is up and running.");
        }