Edit C:\Users\Admin\.m2\repository\org\dspace\dspace-api\6.2\org\dspace\app\statistics\LogAnalyser.class
???? 3e ?? ? ?? ? ?? a????? ? ??? ??? ?? ? ? ? ? ? ?? ? ? ? ? ? ? ? ? ? ? ? ? ? . 1 ? 5? 5 5 1 ? ? ? ? ! " ?#$ ?% ?& ' ()*+ ,- ?./ 01 2 3 a4 15 .56 7898:; <= >? @A BC DE aF)GH mI mJ KL MN MI O PQ uR uS TU y?V mWX yYZ[\]^_` ? a ?bc)defghgijk 5lmnopqrs t 5uvw xyz {|} ~? ? ???? ? ?? y ?? ?? ?5?? ? ??? ????? ? ???? ?? ?? ?? ?? ???? ? ? ???? ???? ?? ? ? ?? m?8?????? m????)?? ?????? ?? ?? a?? ? ?? ??? a?? ?? ??? ?? ???? ??? ???? ???? ???????? ??????? actionAggregator Ljava/util/Map; Signature 6Ljava/util/Map<Ljava/lang/String;Ljava/lang/Integer;>; searchAggregator userAggregator itemAggregator archiveStats warnCount I excCount lineCount generalSummary Ljava/util/List; $Ljava/util/List<Ljava/lang/String;>; excludeWords excludeTypes excludeChars itemTypes searchFloor itemFloor itemLookup userEmail Ljava/lang/String; url name hostName views excludeCharRX Ljava/util/regex/Pattern; handleRX itemRX queryRX collectionRX communityRX resultsRX singleRX valid13 validBase valid14 logRegex comment real typeRX wordRX startTime Ljava/util/Calendar; logDir fileTemplate configFile outFile startDate Ljava/util/Date; endDate logStartDate logEndDate <init> ()V Code LineNumberTable LocalVariableTable this 'Lorg/dspace/app/statistics/LogAnalyser; main ([Ljava/lang/String;)V i argv [Ljava/lang/String; context Lorg/dspace/core/Context; myLogDir myFileTemplate myConfigFile myOutFile myStartDate myEndDate myLookUp Z StackMapTableT?;Q Exceptions?? processLogs ?(Lorg/dspace/core/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;Z)Ljava/lang/String; e Ljava/io/IOException; j words handle matchHandle Ljava/util/regex/Matcher; matchItem logLine #Lorg/dspace/app/statistics/LogLine; line matchRegex avg Ljava/lang/Double; fr Ljava/io/FileReader; br Ljava/io/BufferedReader; logFiles [Ljava/io/File;|? ?? setParameters l(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/util/Date;Z)V createOutput ()Ljava/lang/String; key out Ljava/io/BufferedWriter; summary Ljava/lang/StringBuffer; keys Ljava/util/Iterator; sdf Ljava/text/SimpleDateFormat; address endTime timeInMillis J LocalVariableTypeTable (Ljava/util/Iterator<Ljava/lang/String;>;U?_? getLogFiles #(Ljava/lang/String;)[Ljava/io/File; logs Ljava/io/File;? setRegex (Ljava/lang/String;)V charRegEx logLineBase logLine13 logLine14 typeRXString wordRXString getConfigFile readConfig value matchComment matchReal record increment 6(Ljava/util/Map;Ljava/lang/String;)Ljava/lang/Integer; map newValue Ljava/lang/Integer;H ](Ljava/util/Map<Ljava/lang/String;Ljava/lang/Integer;>;Ljava/lang/String;)Ljava/lang/Integer; parseDate $(Ljava/lang/String;)Ljava/util/Date; Ljava/text/ParseException; date parsedDate? unParseDate $(Ljava/util/Date;)Ljava/lang/String; analyseQuery '(Ljava/lang/String;)[Ljava/lang/String; query matchQuery matchCollection matchCommunity matchResults matchTypes matchChars matchWords single st Ljava/util/StringTokenizer;? getLogLine 7(Ljava/lang/String;)Lorg/dspace/app/statistics/LogLine; match getNumItems @(Lorg/dspace/core/Context;Ljava/lang/String;)Ljava/lang/Integer; type discoverQuery $Lorg/dspace/discovery/DiscoverQuery; accessionedQuery Ljava/lang/StringBuilder;? .(Lorg/dspace/core/Context;)Ljava/lang/Integer; usage <clinit> SourceFile LogAnalyser.javaIJ java/util/GregorianCalendar>? org/dspace/core/Context?J -log?? -file -cfg -out -help?J??? -start?? -end -lookupgh java/util/HashMap java/util/ArrayList !"#??B(??A(??@(??9.???????? java/io/FileReader??I? java/io/BufferedReaderI java/io/IOException? java/lang/StringBuilder Failed to read log file ????DEFE GE HE WARN ERROR? search ????? login'( off? view_item/. 0.?J All Items?? java/lang/String?? dspace.hostname+( dspace.name*( dspace.url)( / ! java/lang/Integer"#$%&'()*,?? java/util/Date+,I-C( java/lang/StringBuffer log_lines=?. / warnings= exceptions= general_summary= server_name= service_name= java/text/SimpleDateFormat dd'/'MM'/'yyyy start_date=0? end_date=12345?6?78 archive. =9 action. user_email= user. on alias Address search_floor=$: search. item_floor=% host_url= item_lookup=& item. avg_item_views=?;, analysis_process_time=<?= java/io/BufferedWriter java/io/FileWriterI>??@J Unable to write to output file java/io/FileA? 'Passed log directory is not a directoryBC [ \ ]DE-. handle= ,item_id=.*$ query=1. collection_id=[0-9]*,2. community_id=[0-9]*,3. ,results=(.*)4. ( . |^. | .$)5. ?^(\d\d\d\d-\d\d\-\d\d) \d\d:\d\d:\d\d,\d\d\d (\w+)\s+\S+ @ (.*) U^(\d\d\d\d-\d\d\-\d\d) \d\d:\d\d:\d\d,\d\d\d (\w+)\s+\S+ @ ([^:]+):[^:]+:([^:]+):(.*) [^(\d\d\d\d-\d\d\-\d\d) \d\d:\d\d:\d\d,\d\d\d (\w+)\s+\S+ @ ([^:]+):[^:]+:[^:]+:([^:]+):(.*)6.8.7. ( | )<. ^ $=. Failed to read config file: :.;.F. general.summary)GH? exclude.word exclude.type exclude.character item.type item.floorIJ search.floor item.lookup user.emailK? yyyy'-'MM'-'ddL? java/text/ParseException %The date is not in the correct format yyyy'-'MM'-'dd'T'hh:mm:ss'Z' UTCMNOPQR? java/util/StringTokenizerST? :ip_addrUJ !org/dspace/app/statistics/LogLineVWIX "org/dspace/discovery/DiscoverQueryYZ[ dc.type= *\Q dc.date.accessioned_dt:[?? TO withdrawn: false archived: true]^_`$abc,Usage Information: LogAnalyser [options [parameters]] -log [log directory] Optional Specify a directory containing log files Default uses [dspace.dir]/log from dspace.cfg -file [file name regex] Optional Specify a regular expression as the file name template. Currently this needs to be correctly escaped for Java string handling (FIXME) Default uses dspace.log* -cfg [config file path] Optional Specify a config file to be used Default uses dstat.cfg in dspace config directory -out [output file path] Optional Specify an output file to write results into Default uses dstat.dat in dspace log directory -start [YYYY-MM-DD] Optional Specify the start date of the analysis If a start date is specified then no attempt to gather current database statistics will be made unless -lookup is also passed Default is to start from the earliest date records exist for -end [YYYY-MM-DD] Optional Specify the end date of the analysis If an end date is specified then no attempt to gather current database statistics will be made unless -lookup is also passed Default is to work up to the last date records exist for -lookup Optional Force a lookup of the current database statistics Only needs to be used if date constraints are also in place -help display this usage information ^# ^(.+)=(.+) log.report.dir dspace\.log.* dspace.dird( config dstat.cfg dstat.dat %org/dspace/app/statistics/LogAnalyser java/lang/Object java/lang/Exception java/sql/SQLException java/util/regex/Matcher +org/dspace/discovery/SearchServiceException java/util/Iterator java/util/Calendar turnOffAuthorisationSystem equals (Ljava/lang/Object;)Z java/lang/System exit (I)V getName java/util/regex/Pattern matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; matches ()Z toString (Ljava/io/Reader;)V Ljava/io/PrintStream; append -(Ljava/lang/String;)Ljava/lang/StringBuilder; java/io/PrintStream println readLine afterDate (Ljava/util/Date;)Z beforeDate getDate ()Ljava/util/Date; isLevel (Ljava/lang/String;)Z getAction isAction getParams java/util/Map put 8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; getUser replaceAll &(Ljava/lang/String;)Ljava/lang/String; trim close java/util/List size ()I get (I)Ljava/lang/Object; $org/dspace/core/ConfigurationManager getProperty endsWith &(Ljava/lang/Object;)Ljava/lang/Object; intValue doubleValue ()D java/lang/Math ceil (D)D java/lang/Double valueOf (D)Ljava/lang/Double; getTime ()J (J)V (I)Ljava/lang/String; ,(Ljava/lang/String;)Ljava/lang/StringBuffer; format keySet ()Ljava/util/Set; java/util/Set iterator ()Ljava/util/Iterator; hasNext next ()Ljava/lang/Object; -(Ljava/lang/Object;)Ljava/lang/StringBuilder; (I)Ljava/lang/StringBuilder; getTimeInMillis java/lang/Long (J)Ljava/lang/String; (Ljava/io/Writer;)V write flush isDirectory listFiles ()[Ljava/io/File; compile -(Ljava/lang/String;)Ljava/util/regex/Pattern; group (I)Ljava/lang/Integer; add parseInt (Ljava/lang/String;)I containsKey parse java/util/TimeZone getTimeZone ((Ljava/lang/String;)Ljava/util/TimeZone; setTimeZone (Ljava/util/TimeZone;)V toLowerCase countTokens nextToken indexOf org/dspace/core/LogManager unescapeLogField [(Ljava/util/Date;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V $org/apache/commons/lang3/StringUtils isNotBlank (Ljava/lang/CharSequence;)Z addFilterQueries org/dspace/discovery/SearchUtils getSearchService &()Lorg/dspace/discovery/SearchService; "org/dspace/discovery/SearchService d(Lorg/dspace/core/Context;Lorg/dspace/discovery/DiscoverQuery;)Lorg/dspace/discovery/DiscoverResult; #org/dspace/discovery/DiscoverResult getTotalSearchResults separator ! . ! " # $ % & '( )( *( +( , -. /. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. :. ;. <. =. >? @( A( B( C( DE FE GE HE IJ K / *? ? L -M NO PQ K ? Y? ? ? Y? L+? MN::::66 *?? ?* 2? ? * `2M* 2 ? ? * `2N* 2? ? * `2:* 2? ? * `2:* 2 ? ? ? ? * 2? ? * `2? :* 2? ? * `2? :* 2? ? 6? ??X+,-? W? L ~ ? ? ? ? ? ? ? ? # ? &