1 /** 2 * Logback: the generic, reliable, fast and flexible logging framework. 3 * 4 * Copyright (C) 2000-2008, QOS.ch 5 * 6 * This library is free software, you can redistribute it and/or modify it under 7 * the terms of the GNU Lesser General Public License as published by the Free 8 * Software Foundation. 9 */ 10 package ch.qos.logback.classic.pattern; 11 12 import ch.qos.logback.classic.spi.LoggingEvent; 13 14 /** 15 * Converts an event to the logger context's name. 16 * 17 * @author Ceki Gülcü 18 */ 19 public class ContextNameConverter extends ClassicConverter { 20 21 /** 22 * Return the name of the logger context's name. 23 */ 24 public String convert(LoggingEvent event) { 25 return getContext().getName(); 26 } 27 28 }