// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; namespace Microsoft.AspNet.Routing.Logging.Internal { public static class LogFormatter { /// /// A formatter for use with . /// public static string Formatter(object o, Exception e) { if (o != null && e != null) { return o + Environment.NewLine + e; } if (o != null) { return o.ToString(); } if (e != null) { return e.ToString(); } return ""; } } }