IRawLayout.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #region Apache License
  2. //
  3. // Licensed to the Apache Software Foundation (ASF) under one or more
  4. // contributor license agreements. See the NOTICE file distributed with
  5. // this work for additional information regarding copyright ownership.
  6. // The ASF licenses this file to you under the Apache License, Version 2.0
  7. // (the "License"); you may not use this file except in compliance with
  8. // the License. You may obtain a copy of the License at
  9. //
  10. // http://www.apache.org/licenses/LICENSE-2.0
  11. //
  12. // Unless required by applicable law or agreed to in writing, software
  13. // distributed under the License is distributed on an "AS IS" BASIS,
  14. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. // See the License for the specific language governing permissions and
  16. // limitations under the License.
  17. //
  18. #endregion
  19. using System;
  20. using log4net;
  21. using log4net.Core;
  22. using log4net.Util.TypeConverters;
  23. namespace log4net.Layout
  24. {
  25. /// <summary>
  26. /// Interface for raw layout objects
  27. /// </summary>
  28. /// <remarks>
  29. /// <para>
  30. /// Interface used to format a <see cref="LoggingEvent"/>
  31. /// to an object.
  32. /// </para>
  33. /// <para>
  34. /// This interface should not be confused with the
  35. /// <see cref="ILayout"/> interface. This interface is used in
  36. /// only certain specialized situations where a raw object is
  37. /// required rather than a formatted string. The <see cref="ILayout"/>
  38. /// is not generally useful than this interface.
  39. /// </para>
  40. /// </remarks>
  41. /// <author>Nicko Cadell</author>
  42. /// <author>Gert Driesen</author>
  43. [TypeConverter(typeof(RawLayoutConverter))]
  44. public interface IRawLayout
  45. {
  46. /// <summary>
  47. /// Implement this method to create your own layout format.
  48. /// </summary>
  49. /// <param name="loggingEvent">The event to format</param>
  50. /// <returns>returns the formatted event</returns>
  51. /// <remarks>
  52. /// <para>
  53. /// Implement this method to create your own layout format.
  54. /// </para>
  55. /// </remarks>
  56. object Format(LoggingEvent loggingEvent);
  57. }
  58. }