4 // Lukas Lipka <lukas@pmad.net>
5 // Raphael Slinckx <rslinckx@gmail.com>
7 // Copyright (C) 2005 Novell, Inc.
13 namespace ImLogViewer
{
15 public class ImLogViewer
{
17 private static string highlight
;
18 private static string search
;
19 private static string path
;
21 public static void Main (string[] args
)
24 Catalog
.Init ("beagle", Beagle
.Util
.ExternalStringsHack
.LocaleDir
);
27 ImLogWindow window
= new ImLogWindow (path
, search
, highlight
);
30 private static void PrintUsageAndExit ()
32 Console
.WriteLine ("USAGE: beagle-imlogviewer [OPTIONS] <log file or directory>\n" +
34 " --highlight-search\t\tWords to highlight in the buffer.\n" +
35 " --search\t\t\tSearch query to filter hits on.");
40 private static void ParseArgs (string [] args
)
45 for (int i
= 0; i
< args
.Length
; i
++) {
52 case "--highlight-search":
53 highlight
= args
[i
+ 1];
58 search
= args
[i
+ 1];
63 if (args
[i
].StartsWith ("--")) {
64 Console
.WriteLine ("WARN: Invalid option {0}", args
[i
]);
73 Console
.WriteLine ("ERROR: Please specify a valid log path or log directory.");