Pharo 在会话期间是否有消息或警告日志?

问题描述 投票:0回答:1

当我启动 Pharo 图像时,我收到有关

.sources
文件丢失的警告,因为我已将
.image
.sources
.changes
文件重命名为我的偏好之一。

它出现了一段时间然后消失了,但我怀疑它被记录在系统的某个地方。

我正在寻找的是 Emacs 中消息日志的内容

以下是两个文件的一些示例内容:

{{image-folder}}/PharoDebug.log

文件内容 -

{{image-folder}}/PharoDebug.log

THERE_BE_DRAGONS_HERE
Pharo cannot locate the sources file named {{image-folder}}/Pharo10.0-64bit-28169ae.sources.

Please check that the file is named properly and is in the
same directory as this image.
26 June 2024 4:54:50.964965 am

VM: unix - x86_64 - linux-gnu - CoInterpreter VMMaker-tonel.1 uuid: 97a2c5d3-7db4-0d00-9da7-39dc08c6380e Mar 30 2023
StackToRegisterMappingCogit VMMaker-tonel.1 uuid: 97a2c5d3-7db4-0d00-9da7-39dc08c6380e Mar 30 2023
v9.0.22 - Commit: 421845e - Date: 2023-03-30 09:49:26 +0200

Image: Pharo10.0.0 [Build information: Pharo-10.0.0+build.539.sha.28169ae414c78e07602b31545f43061b4fa7a88a (64 Bit)]

StartupUIManager>>inform:
    Receiver: a StartupUIManager
    Arguments and temporary variables: 
        arg1:   'Pharo cannot locate the sources file named {{image-folder}}...etc...
        tmp1:   nil
    Receiver's instance variables: 
        doNotQuitOnRestart:     false
        uiManager:  nil


PharoFilesOpener(Object)>>inform:
    Receiver: a PharoFilesOpener
    Arguments and temporary variables: 
        arg1:   'Pharo cannot locate the sources file named {{image-folder}}...etc...
    Receiver's instance variables: 
        shouldInformAboutReadOnlyChanges:   nil


PharoFilesOpener>>inform:withRef:
    Receiver: a PharoFilesOpener
    Arguments and temporary variables: 
        arg1:   'Pharo cannot locate &fileRef.

Please check that the file is named prope...etc...
        arg2:   'the sources file named {{image-folder}}...etc...
    Receiver's instance variables: 
        shouldInformAboutReadOnlyChanges:   nil


SourceFileArray>>ensureOpen
    Receiver: a SourceFileArray
    Arguments and temporary variables: 
        tmp1:   nil
        tmp2:   nil
    Receiver's instance variables: 
        files:  #(nil nil)
        readOnlyQueue:  SharedQueue with 0 items
        flushChanges:   true


SmalltalkImage>>openSourceFiles
    Receiver: Smalltalk
    Arguments and temporary variables: 
x
    Receiver's instance variables: 
        globals:    a SystemDictionary(lots of globals)
        specialObjectsArray:    an Array(nil false true #Processor->Processor Bitmap Small...etc...
        vm:     a VirtualMachine


SourceFileArray class>>startUp:
    Receiver: SourceFileArray
    Arguments and temporary variables: 
        arg1:   true
    Receiver's instance variables: 
        superclass:     Object
        methodDict:     a MethodDictionary(#changeRecordsFor:->SourceFileArray>>#changeReco...etc...
        format:     65539
        layout:     a FixedLayout
        organization:   a ClassOrganization
        subclasses:     nil
        name:   #SourceFileArray
        classPool:  a Dictionary()
        sharedPools:    an OrderedCollection()
        environment:    a SystemDictionary(lots of globals)
        category:   #'System-Sources-Sources'


ClassSessionHandler>>startup:
    Receiver: a ClassSessionHandler(SourceFileArray)
    Arguments and temporary variables: 
        arg1:   true
    Receiver's instance variables: 
        registeredClassName:    #SourceFileArray

内容来自

{{image-directory}}/pharo-local/play-cache/{{date-stamp}}.ombu

OmEntry {
    #tags : {
        #timestamp : DateAndTime [ '2024-06-26T10:46:24.746658+01:00' ],
        #self : OmReference [ '1' ]
    },
    #content : 'Smalltalk tools changeList browseRecentLog'
}

OmEntry {
    #tags : {
        #timestamp : DateAndTime [ '2024-06-26T10:49:02.067969+01:00' ],
        #self : OmReference [ '2' ]
    },
    #content : 'Smalltalk tools changeList browseRecentLog.\r\rSmalltalk '
}

OmEntry {
    #tags : {
        #timestamp : DateAndTime [ '2024-06-26T12:09:38.694579+01:00' ],
        #self : OmReference [ '3' ]
    },
    #content : 'Smalltalk tools changeList browseRecentLog.\r\rSmalltalk \r\rIceRepository registry collect: #workingCopy\r\r'
}
logging message smalltalk pharo
1个回答
0
投票

我认为您正在寻找TinyLogger。您可以将其添加到您的图像中并在 Pharo 应用程序中记录错误。

还有 Log4s 端口,但那是针对旧 Pharo 的。

我希望这就是您正在寻找的。

© www.soinside.com 2019 - 2024. All rights reserved.