Changeset 1746 for trunk/autoquest-htmlmonitor/src/main
- Timestamp:
- 09/16/14 13:58:20 (10 years ago)
- Location:
- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorLogManager.java
r1227 r1746 127 127 if (writer == null) { 128 128 writer = new HtmlMonitorOutputWriter 129 (logFileBaseDir, clientInfos.getWebAppId(), clientInfos.getClientId()); 129 (logFileBaseDir, clientInfos.getWebAppId(), 130 clientInfos.getClientId(), clientInfos.getUserAgent()); 130 131 131 132 writer.init(); -
trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorOutputWriter.java
r1430 r1746 74 74 75 75 /** 76 * the user agent used by the client 77 */ 78 private String userAgent; 79 80 /** 76 81 * the log file into which all messages are currently written 77 82 */ … … 105 110 * @param clientId the ID of the client, for which this writer logs 106 111 */ 107 public HtmlMonitorOutputWriter(String logFileBaseDir, String webAppId, String clientId) { 112 public HtmlMonitorOutputWriter(String logFileBaseDir, 113 String webAppId, 114 String clientId, 115 String userAgent) 116 { 108 117 if (logFileBaseDir == null) { 109 118 this.logFileBaseDir = new File(DEFAULT_LOG_FILE_BASE_DIR); … … 115 124 this.webAppId = webAppId; 116 125 this.clientId = clientId; 126 this.userAgent = userAgent; 117 127 118 128 lastUpdate = System.currentTimeMillis(); … … 442 452 outputWriter = new PrintWriter(new OutputStreamWriter(fis, "UTF-8")); 443 453 outputWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); 444 outputWriter.println("<session>"); 454 outputWriter.print("<session webapp=\""); 455 outputWriter.print(StringTools.xmlEntityReplacement(this.webAppId)); 456 outputWriter.print("\" clientId=\""); 457 outputWriter.print(StringTools.xmlEntityReplacement(this.clientId)); 458 outputWriter.print("\" userAgent=\""); 459 outputWriter.print(StringTools.xmlEntityReplacement(this.userAgent)); 460 outputWriter.println("\">"); 445 461 446 462 loggedGUIElements.clear();
Note: See TracChangeset
for help on using the changeset viewer.