OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * | 9 * |
10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
872 element.classList.add("console-error-level"); | 872 element.classList.add("console-error-level"); |
873 break; | 873 break; |
874 case WebInspector.ConsoleMessage.MessageLevel.Info: | 874 case WebInspector.ConsoleMessage.MessageLevel.Info: |
875 element.classList.add("console-info-level"); | 875 element.classList.add("console-info-level"); |
876 break; | 876 break; |
877 } | 877 } |
878 | 878 |
879 if (this._message.type === WebInspector.ConsoleMessage.MessageType.Start Group || this._message.type === WebInspector.ConsoleMessage.MessageType.StartGro upCollapsed) | 879 if (this._message.type === WebInspector.ConsoleMessage.MessageType.Start Group || this._message.type === WebInspector.ConsoleMessage.MessageType.StartGro upCollapsed) |
880 element.classList.add("console-group-title"); | 880 element.classList.add("console-group-title"); |
881 | 881 |
882 if (WebInspector.settings.consoleTimestampsEnabled.get()) { | |
883 var timestamp = document.createElement("span"); | |
884 timestamp.className = "console-timestamp"; | |
885 timestamp.textContent = new Date(this._message.timestamp * 1000).toI SOString().replace("T", " ").replace("Z", ""); | |
apavlov
2014/03/04 14:06:46
This will generate time in UTC, while users will w
| |
886 | |
887 element.appendChild(timestamp); | |
888 } | |
889 | |
882 element.appendChild(this.formattedMessage()); | 890 element.appendChild(this.formattedMessage()); |
883 | 891 |
884 if (this._message.repeatCount > 1) | 892 if (this._message.repeatCount > 1) |
885 this.updateRepeatCount(); | 893 this.updateRepeatCount(); |
886 | 894 |
887 return element; | 895 return element; |
888 }, | 896 }, |
889 | 897 |
890 _populateStackTraceTreeElement: function(parentTreeElement) | 898 _populateStackTraceTreeElement: function(parentTreeElement) |
891 { | 899 { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1018 } | 1026 } |
1019 | 1027 |
1020 return sourceString + " " + typeString + " " + levelString + ": " + this .formattedMessage().textContent + "\n" + this._message.url + " line " + this._me ssage.line; | 1028 return sourceString + " " + typeString + " " + levelString + ": " + this .formattedMessage().textContent + "\n" + this._message.url + " line " + this._me ssage.line; |
1021 }, | 1029 }, |
1022 | 1030 |
1023 get text() | 1031 get text() |
1024 { | 1032 { |
1025 return this._message.messageText; | 1033 return this._message.messageText; |
1026 } | 1034 } |
1027 } | 1035 } |
OLD | NEW |