Microsoft_WindowsAzure
[ class tree: Microsoft_WindowsAzure ] [ index: Microsoft_WindowsAzure ] [ all elements ]

Class: Microsoft_WindowsAzure_Log_Writer_WindowsAzure

Source Location: /WindowsAzure/Log/Writer/WindowsAzure.php

Class Overview

Microsoft_Log_Writer_Abstract
   |
   --Microsoft_WindowsAzure_Log_Writer_WindowsAzure



Author(s):

Version:

  • $Id: Abstract.php 22632 2010-07-18 18:30:08Z ramon $

Copyright:

  • Copyright (c) 2009 - 2010, RealDolmen (http://www.realdolmen.com)

Variables

Methods


Inherited Variables

Inherited Methods

Class: Microsoft_Log_Writer_Abstract

Microsoft_Log_Writer_Abstract::addFilter()
Add a filter specific to this writer.
Microsoft_Log_Writer_Abstract::setFormatter()
Set a new formatter for this writer
Microsoft_Log_Writer_Abstract::shutdown()
Perform shutdown activites such as closing open resources
Microsoft_Log_Writer_Abstract::write()
Log a message to this writer.
Microsoft_Log_Writer_Abstract::_parseConfig()
Validate and optionally convert the config to array
Microsoft_Log_Writer_Abstract::_write()
Write a message to the log.

Class Details

[line 48]


Tags:

version:  $Id: Abstract.php 22632 2010-07-18 18:30:08Z ramon $
copyright:  Copyright (c) 2009 - 2010, RealDolmen (http://www.realdolmen.com)
license:  http://phpazure.codeplex.com/license


[ Top ]


Class Variables

$_bufferMessages =  false

[line 75]

Whether to keep all messages to be logged in an external buffer until the script ends and only then to send the messages in batch to the logging component.



Tags:

access:  protected

Type:   bool


[ Top ]

$_formatter =

[line 53]



Tags:

access:  protected

Type:   Microsoft_Log_Formatter_Interface
Overrides:   Array


[ Top ]

$_messageBuffer = array()

[line 83]

If message buffering is activated, it will store all the messages in this buffer and only write them to table storage (in a batch transaction) when the script ends.



Tags:

access:  protected

Type:   array


[ Top ]

$_tableName =  null

[line 67]

Name of the table to use for logging purposes



Tags:

access:  protected

Type:   string


[ Top ]

$_tableStorageConnection =  null

[line 60]

Connection to a windows Azure



Tags:

access:  protected

Type:   Microsoft_Service_WindowsAzure_Storage_Table


[ Top ]



Class Methods


static method factory [line 142]

static Microsoft_Log_Writer_WindowsAzure factory( array $config)

Create a new instance of Microsoft_Log_Writer_WindowsAzure



Tags:

throws:  Microsoft_Log_Exception
access:  public


Parameters:

array   $config  

[ Top ]

constructor __construct [line 90]

Microsoft_WindowsAzure_Log_Writer_WindowsAzure __construct( Microsoft_WindowsAzure_Storage_Table $tableStorageConnection, string $tableName, [bool $createTable = true], [ $bufferMessages = true])



Tags:

access:  public


Parameters:

Microsoft_Service_WindowsAzure_Storage_Table   $tableStorageConnection  
string   $tableName  
bool   $createTable   create the Windows Azure table for logging if it does not exist
   $bufferMessages  

[ Top ]

method setFormatter [line 163]

void setFormatter( $formatter)

The only formatter accepted is already loaded in the constructor



Tags:

todo:  enable custom formatters using the WindowsAzure_Storage_DynamicTableEntity class
access:  public


Overrides Microsoft_Log_Writer_Abstract::setFormatter() (Set a new formatter for this writer)

Parameters:


[ Top ]

method shutdown [line 124]

void shutdown( )

If the log messages have been stored in the internal buffer, just send them to table storage.



Tags:

access:  public


Overrides Microsoft_Log_Writer_Abstract::shutdown() (Perform shutdown activites such as closing open resources)

[ Top ]

method _write [line 177]

void _write( array $event)

Write a message to the table storage. If buffering is activated, then messages will just be added to an internal buffer.



Tags:

todo:  format the event using a formatted, not in this method
access:  protected


Overrides Microsoft_Log_Writer_Abstract::_write() (Write a message to the log.)

Parameters:

array   $event  

[ Top ]


Documentation generated on Wed, 18 May 2011 12:07:01 +0200 by phpDocumentor 1.4.3