C# Class LogStreamer.Program

Afficher le fichier Open project: StarcounterPrefabs/LogStreamer

Méthodes publiques

Méthode Description
ConfigToJson ( ILogStreamerConfiguration cfg ) : string
Connect ( ) : void
Disconnect ( ) : void
GetConfigDirectory ( ) : string
GetDefaultFilePath ( ) : string
StrFormatByteSize ( long filesize ) : string

Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.

Private Methods

Méthode Description
BuildWhitelistResponse ( int>.Dictionary whitelist ) : Response
GetWhitelistViewUrl ( int>.Dictionary whitelist, string accessUri ) : string
HandleGETConfig ( ) : Response
HandleGETDefaultConfigFile ( ) : Response
HandleGETDownstreamWhitelist ( ) : Response
HandleGETLog ( ) : Response
HandleGETRoot ( ) : Response
HandleGETRootParam ( string param ) : Response
HandleGETSampleConfigFile ( ) : Response
HandleGETUpstreamWhitelist ( ) : Response
Main ( string args ) : void

The LogStreamer sample application allows simple transaction log streaming between Starcounter databases. It accepts three kinds of command line parameters. An URI or file path ending with ".logstreamer.xml" is taken to be the source of a LogStreamer configuration to use. If it is a local file path, the file will be created if necessary. Any other string not starting with '@' will be taken as the upstream URI to use. Either or both of these parameters may be omitted. Parameters starting with '@' are documented in code, but should not be needed for general use. Usually when starting LogStreamer, you'll want to launch it into a specific database. If you prefer, you can do that from the command line using something like this: star.exe -d=DBNAME LogStreamer.exe

SessionStatus ( System.StringBuilder sb, bool isUpstream, LogStreamerSession sess ) : void
StrFormatByteSize ( long fileSize, [ buffer, int bufferSize ) : long
Usage ( ) : void
WhitelistToJson ( System.StringBuilder sb, int>.Dictionary dict ) : void
WriteNonzero ( System.StringBuilder sb, string label, int n ) : bool
WriteNonzero ( System.StringBuilder sb, string label, ulong n ) : bool

Method Details

ConfigToJson() public static méthode

public static ConfigToJson ( ILogStreamerConfiguration cfg ) : string
cfg ILogStreamerConfiguration
Résultat string

Connect() public static méthode

public static Connect ( ) : void
Résultat void

Disconnect() public static méthode

public static Disconnect ( ) : void
Résultat void

GetConfigDirectory() public static méthode

public static GetConfigDirectory ( ) : string
Résultat string

GetDefaultFilePath() public static méthode

public static GetDefaultFilePath ( ) : string
Résultat string

StrFormatByteSize() public static méthode

Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.
public static StrFormatByteSize ( long filesize ) : string
filesize long
Résultat string