Table of Contents

Class: LogFile | Twisted-0.17.4/twisted/lumberjack/logfile.py
--- | ---

A log file that can be rotated.

Methods |
--- | ---

__getstate__ __init__ __setstate__ _openFile close flush | getCurrentLog getLog listLogs rotate write

| __getstate__

    __getstate__ ( self )

| __init__

    __init__ (
            self,
            name,
            directory,
            rotateLength=100000,
            )

| __setstate__

    __setstate__ ( self,  state )

| _openFile

    _openFile ( self )

Open the log file.

| close

    close ( self )

### Close the file.

The file cannot be used once it has been closed.

| flush

    flush ( self )

Flush the file.

| getCurrentLog

    getCurrentLog ( self )

Return a LogReader for the current log file.

| getLog

    getLog ( self,  identifier )

Given an integer, return a LogReader for an old log file.

Exceptions |
--- | ---
ValueError, "no such logfile exists"

| listLogs

    listLogs ( self )

Return sorted list of integers - the old logs' identifiers.

| rotate

    rotate ( self )

Rotate the file and create a new one.

| write

    write ( self,  data )

Write some data to the file.

Table of Contents

This document was automatically generated on Sat Apr 20 01:32:15 2002 by HappyDoc version 2.0