Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 2304

Show
Ignore:
Timestamp:
06/14/07 03:19:48 (1 year ago)
Author:
kris
Message:

had to rename Layout to be EventLayout?, in order to avoid conflict with tango.text.convert.Layout

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tango/util/log/Appender.d

    r1121 r2304  
    1414 
    1515public import   tango.util.log.Event, 
    16                 tango.util.log.Layout; 
     16                tango.util.log.EventLayout; 
    1717 
    1818/******************************************************************************* 
     
    2121        emitting messages sent to a particular logger. There may be more 
    2222        than one appender attached to any logger. The actual message is 
    23         constructed by another class known as a Layout. 
     23        constructed by another class known as an EventLayout. 
    2424         
    2525*******************************************************************************/ 
     
    3030 
    3131        private Appender        next; 
    32         private Layout          layout; 
     32        private EventLayout     layout; 
    3333 
    3434        /*********************************************************************** 
     
    105105        ***********************************************************************/ 
    106106 
    107         void setLayout (Layout layout) 
     107        void setLayout (EventLayout layout) 
    108108        { 
    109109                if (layout) 
     
    117117        ***********************************************************************/ 
    118118 
    119         Layout getLayout () 
     119        EventLayout getLayout () 
    120120        { 
    121121                return layout; 
  • trunk/tango/util/log/Configurator.d

    r1121 r2304  
    1414 
    1515private import  tango.util.log.Log, 
    16                 tango.util.log.Layout, 
     16                tango.util.log.EventLayout, 
    1717                tango.util.log.ConsoleAppender; 
    1818 
  • trunk/tango/util/log/ConsoleAppender.d

    r1121 r2304  
    3434        ***********************************************************************/ 
    3535 
    36         this (Layout layout = null) 
     36        this (EventLayout layout = null) 
    3737        { 
    3838                // Get a unique fingerprint for this class 
     
    7272        synchronized void append (Event event) 
    7373        { 
    74                 Layout layout = getLayout; 
    75                 Cerr.append (layout.header  (event)); 
    76                 Cerr.append (layout.content (event)); 
    77                 Cerr.append (layout.footer  (event));                         
     74                auto layout = getLayout; 
     75                Cerr (layout.header  (event)); 
     76                Cerr (layout.content (event)); 
     77                Cerr (layout.footer  (event));                         
    7878                Cerr.newline; 
    7979        } 
  • trunk/tango/util/log/DateLayout.d

    r2164 r2304  
    1414 
    1515private import  tango.util.log.Event, 
    16                 tango.util.log.Layout; 
     16                tango.util.log.EventLayout; 
    1717 
    1818private import  tango.text.Util; 
     
    2929*******************************************************************************/ 
    3030 
    31 public class DateLayout : Layout 
     31public class DateLayout : EventLayout 
    3232{ 
    3333        private bool localTime; 
  • trunk/tango/util/log/Event.d

    r2164 r2304  
    3939        Note that Event instances are maintained in a freelist rather than 
    4040        being allocated each time, and they include a scratchpad area for 
    41         Layout formatters to use. 
     41        EventLayout formatters to use. 
    4242 
    4343*******************************************************************************/ 
  • trunk/tango/util/log/EventLayout.d

    r1634 r2304  
    1111*******************************************************************************/ 
    1212 
    13 module tango.util.log.Layout; 
     13module tango.util.log.EventLayout; 
    1414 
    1515private import tango.util.log.Event; 
     
    1919/******************************************************************************* 
    2020 
    21         Base class for all Layout instances 
     21        Base class for all logging layout instances 
    2222 
    2323*******************************************************************************/ 
    2424 
    25 public class Layout 
     25public class EventLayout 
    2626{ 
    2727        /*********************************************************************** 
     
    8585*******************************************************************************/ 
    8686 
    87 public class SpartanLayout : Layout 
     87public class SpartanLayout : EventLayout 
    8888{ 
    8989        /*********************************************************************** 
     
    107107*******************************************************************************/ 
    108108 
    109 public class SimpleLayout : Layout 
     109public class SimpleLayout : EventLayout 
    110110{ 
    111111        /*********************************************************************** 
     
    131131*******************************************************************************/ 
    132132 
    133 public class SimpleTimerLayout : Layout 
     133public class SimpleTimerLayout : EventLayout 
    134134{ 
    135135        /*********************************************************************** 
  • trunk/tango/util/log/FileAppender.d

    r1211 r2304  
    5050        ***********************************************************************/ 
    5151 
    52         this (FilePath fp, Layout layout = null) 
     52        this (FilePath fp, EventLayout layout = null) 
    5353        { 
    5454                // Get a unique fingerprint for this instance 
     
    6262                 
    6363                Create a basic FileAppender to a file with the specified  
    64                 path, and with the given Layout 
     64                path, and with the given EventLayout 
    6565 
    6666        ***********************************************************************/ 
    6767 
    68         this (char[] fp, Layout layout = null) 
     68        this (char[] fp, EventLayout layout = null) 
    6969        { 
    7070                this (new FilePath (fp), layout); 
     
    125125        synchronized void append (Event event) 
    126126        { 
    127                 Layout layout = getLayout; 
     127                auto layout = getLayout; 
    128128                buffer.append (layout.header  (event)); 
    129129                buffer.append (layout.content (event)); 
  • trunk/tango/util/log/Log4Layout.d

    r1634 r2304  
    1616 
    1717private import  tango.util.log.Event, 
    18                 tango.util.log.Layout; 
     18                tango.util.log.EventLayout; 
    1919 
    2020/******************************************************************************* 
     
    2424*******************************************************************************/ 
    2525 
    26 public class Log4Layout : Layout 
     26public class Log4Layout : EventLayout 
    2727{ 
    2828        /*********************************************************************** 
  • trunk/tango/util/log/Logger.d

    r2091 r2304  
    6767        --- 
    6868 
    69         You may also need to use one of the various Layout & Appender  
     69        You may also need to use one of the various layout & appender  
    7070        implementations to support your exact rendering needs. 
    7171         
  • trunk/tango/util/log/MailAppender.d

    r1121 r2304  
    3636        /*********************************************************************** 
    3737                 
    38                 Create with the given Layout and server address 
     38                Create with the given layout and server address 
    3939 
    4040        ***********************************************************************/ 
    4141 
    42         this (InternetAddress server, char[] from, char[] to, char[] subj, Layout layout = null) 
     42        this (InternetAddress server, char[] from, char[] to, char[] subj, EventLayout layout = null) 
    4343        { 
    4444                setLayout (layout); 
  • trunk/tango/util/log/NullAppender.d

    r1121 r2304  
    4444        ***********************************************************************/ 
    4545 
    46         this (Layout layout) 
     46        this (EventLayout layout) 
    4747        { 
    4848                setLayout (layout); 
     
    7979        void append (Event event) 
    8080        { 
    81                 Layout layout = getLayout; 
     81                auto layout = getLayout; 
    8282                layout.header  (event); 
    8383                layout.content (event); 
  • trunk/tango/util/log/PropertyConfigurator.d

    r1598 r2304  
    1818private import  tango.io.FilePath; 
    1919 
    20 private import  tango.util.log.Log, 
    21                 tango.util.log.Layout, 
    22                 tango.util.log.DateLayout, 
    23                 tango.util.log.Configurator, 
    24                 tango.util.log.ConsoleAppender; 
     20private import  tango.util.log.Log; 
    2521 
    2622private import  tango.util.log.model.ILevel; 
  • trunk/tango/util/log/RollingFileAppender.d

    r2131 r2304  
    4747        ***********************************************************************/ 
    4848 
    49         this (char[] path, int count, ulong maxSize, Layout layout = null) 
     49        this (char[] path, int count, ulong maxSize, EventLayout layout = null) 
    5050        { 
    5151                assert (path); 
     
    129129 
    130130                // write log message and flush it 
    131                 Layout layout = getLayout
     131                auto layout = getLayout ()
    132132                msg = layout.header (event); 
    133133                fileSize += msg.length; 
  • trunk/tango/util/log/SocketAppender.d

    r2002 r2304  
    4141        ***********************************************************************/ 
    4242 
    43         this (InternetAddress address, Layout layout = null) 
     43        this (InternetAddress address, EventLayout layout = null) 
    4444        { 
    4545                setLayout (layout); 
     
    8787        void append (Event event) 
    8888        { 
    89                 auto layout = getLayout
     89                auto layout = getLayout()
    9090 
    9191                if (buffer)