The Trunk: SystemReporter-laza.12.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: SystemReporter-laza.12.mcz

commits-2
Alexander Lazarević uploaded a new version of SystemReporter to project The Trunk:
http://source.squeak.org/trunk/SystemReporter-laza.12.mcz

==================== Summary ====================

Name: SystemReporter-laza.12
Author: laza
Time: 1 February 2011, 9:30:59.288 am
UUID: 059b888f-ae13-7f43-806b-611aaaec9005
Ancestors: SystemReporter-laza.11

Add a report for the Debug Logfile

=============== Diff against SystemReporter-laza.11 ===============

Item was changed:
  ----- Method: SystemReporter>>initialize (in category 'initialize-release') -----
  initialize
  self
  add: #Image method: #reportImage;
  add: #'Image Parameters' method: #reportImageParameters;
  add: #'Image Sources' method: #reportSources;
  add: #'Image Preferences' method: #reportPreferences;
  add: #'MC Repositories' method: #reportRepositories;
  add: #'MC Working Copies' method: #reportWorkingCopies;
  add: #'VM General' method: #reportVM;
  add: #'VM Options' method: #reportVMOptions;
  add: #'VM Modules' method: #reportModules;
  add: #'VM Parameters' method: #reportVMParameters;
  add: #'VM Stats' method: #reportVMStats.
  Smalltalk os platformName = 'Win32' ifTrue: [
  self
  add: #'VM Configuration' method: #reportINI.
  ].
  self
  add: #'OS General' method: #reportOS.
  Smalltalk os platformName = 'Win32' ifTrue: [
  self
  add: #'OS Details' method: #reportOSDetails;
  add: #'Hardware Details' method: #reportHardwareDetails;
  add: #'GFX Hardware Details' method: #reportGFXDetails.
  ].
  self
  add: #'Tiny Benchmarks' method: #reportTinyBenchmarks;
+ add: #'SUnit' method: #reportTestRunner;
+ add: #'Debug Log' method: #reportDebugLog.
- add: #'SUnit' method: #reportTestRunner.
  categoriesSelected := Set with: #Image with: #'VM General'.
  self updateReport
  !

Item was added:
+ ----- Method: SystemReporter>>reportDebugLog: (in category 'reporting') -----
+ reportDebugLog: aStream
+ | logFilename logStream contents |
+ self header: 'Debug Logfile' on: aStream.
+ logFilename := Smalltalk image squeakErrorFileName.
+ logStream := nil.
+ [
+ [
+ logStream := FileStream readOnlyFileNamed: logFilename.
+ aStream nextPutAll: logStream name; cr; cr.
+ contents := logStream contents.
+ aStream
+ nextPutAll:
+ ((contents isNil or: [contents size = 0])
+ ifTrue: ['<empty>']
+ ifFalse: [contents]);
+ cr
+ ] on: Error do: [:ex |
+ aStream
+ nextPutAll: (
+ ex class = FileDoesNotExistException
+ ifTrue: [logFilename, ' not found']
+ ifFalse: [ex description]);
+ cr
+ ]
+ ] ensure: [
+ logStream ifNotNil: [logStream close]
+ ]!