You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Pharo会话过程中是否提供消息与警告日志功能?

Pharo启动警告日志定位与查看方法

一、启动警告的日志记录位置

  • PharoDebug.log:与镜像文件同目录,会完整记录启动时的错误/警告详情(比如你遇到的sources文件缺失问题),包含调用栈、VM和镜像的详细信息。
  • ombu会话日志:存储在{{image-directory}}/pharo-local/play-cache/目录下,以时间戳命名,记录交互式操作的历史命令。

1. PharoDebug.log 内容解析

该文件是启动阶段的错误日志,你的sources缺失警告会被完整留存:

THERE_BE_DRAGONS_HERE
Pharo 无法找到名为 {{image-folder}}/Pharo10.0-64bit-28169ae.sources 的源文件。

请检查文件命名是否正确,且是否与镜像文件在同一目录下。
2024年6月26日 上午4:54:50.964965

VM信息:unix - x86_64 - linux-gnu - CoInterpreter VMMaker-tonel.1 uuid: 97a2c5d3-7db4-0d00-9da7-39dc08c6380e 2023年3月30日
StackToRegisterMappingCogit VMMaker-tonel.1 uuid: 97a2c5d3-7db4-0d00-9da7-39dc08c6380e 2023年3月30日
版本v9.0.22 - 提交: 421845e - 日期: 2023-03-30 09:49:26 +0200

镜像信息:Pharo10.0.0 [构建信息: Pharo-10.0.0+build.539.sha.28169ae414c78e07602b31545f43061b4fa7a88a (64位)]

调用栈详情:
StartupUIManager>>inform:
    接收者: a StartupUIManager
    参数与临时变量: 
        arg1:   'Pharo无法找到名为 {{image-folder}}...等内容...
        tmp1:   nil
    接收者实例变量: 
        doNotQuitOnRestart:     false
        uiManager:  nil

PharoFilesOpener(Object)>>inform:
    接收者: a PharoFilesOpener
    参数与临时变量: 
        arg1:   'Pharo无法找到名为 {{image-folder}}...等内容...
    接收者实例变量: 
        shouldInformAboutReadOnlyChanges:   nil

PharoFilesOpener>>inform:withRef:
    接收者: a PharoFilesOpener
    参数与临时变量: 
        arg1:   'Pharo无法找到 &fileRef。

请检查文件命名是否正确...等内容...
        arg2:   '名为 {{image-folder}}...等内容...的源文件'
    接收者实例变量: 
        shouldInformAboutReadOnlyChanges:   nil

SourceFileArray>>ensureOpen
    接收者: a SourceFileArray
    参数与临时变量: 
        tmp1:   nil
        tmp2:   nil
    接收者实例变量: 
        files:  #(nil nil)
        readOnlyQueue:  包含0项的SharedQueue
        flushChanges:   true

SmalltalkImage>>openSourceFiles
    接收者: Smalltalk
    参数与临时变量: 
x
    接收者实例变量: 
        globals:    一个包含大量全局变量的SystemDictionary
        specialObjectsArray:    一个数组(nil false true #Processor->Processor Bitmap Small...等内容...
        vm:     a VirtualMachine

SourceFileArray class>>startUp:
    接收者: SourceFileArray
    参数与临时变量: 
        arg1:   true
    接收者实例变量: 
        superclass:     Object
        methodDict:     一个方法字典(#changeRecordsFor:->SourceFileArray>>#changeReco...等内容...
        format:     65539
        layout:     a FixedLayout
        organization:   a ClassOrganization
        subclasses:     nil
        name:   #SourceFileArray
        classPool:  一个空字典()
        sharedPools:    一个有序集合()
        environment:    一个包含大量全局变量的SystemDictionary
        category:   #'System-Sources-Sources'

ClassSessionHandler>>startup:
    接收者: a ClassSessionHandler(SourceFileArray)
    参数与临时变量: 
        arg1:   true
    接收者实例变量: 
        registeredClassName:    #SourceFileArray

2. ombu会话日志内容解析

该文件记录你在Pharo中执行的交互式命令历史:

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

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

OmEntry {
    #tags : {
        #timestamp : 日期时间 [ '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'
}

二、查看Pharo日志的常用方法

  • 直接查看文件:手动打开PharoDebug.log或pharo-local/play-cache目录下的ombu文件。
  • 在Pharo内查看最近日志:执行命令 Smalltalk tools changeList browseRecentLog,会打开变更列表工具展示最近的日志记录。

内容的提问来源于stack exchange,提问作者vfclists

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 00:57:04