Open liuxiaochenlcx opened 3 hours ago
Hello, @liuxiaochenlcx! I'm here to assist you with any bugs, questions, or contributions you may have. Let's work together to resolve the issue you're experiencing.
I couldn't find a specific solution to the issue of empty logs in Dify version 0.11.1. However, there are some related discussions and issues that might be helpful:
A similar issue was discussed in this thread, where users faced problems with log files in Docker. Although this discussion is unsolved, it might provide some insights or similar experiences.
There was an issue with logging in Docker Compose for version 0.6.9, which was resolved by initializing the logging configuration before any other log configurations. You can find the details of the solution in this issue. Although this is for an earlier version, the approach might be applicable or provide a starting point for troubleshooting.
For Dify version 0.11.1, ensure that your logging configurations in the docker-compose.yaml
file are correctly set up. The configurations include settings for LOG_LEVEL
, LOG_FILE
, LOG_FILE_MAX_SIZE
, LOG_FILE_BACKUP_COUNT
, LOG_DATEFORMAT
, and LOG_TZ
[1][2].
If the problem persists, you might want to check the logging handlers and dependencies used in Dify, such as RotatingFileHandler
and pytz
for timezone handling [3]. These components could be relevant to the issue you're experiencing.
To continue talking to Dosu, mention @dosu.
@xuzuodong
function getThreadMessages(tree: ChatItemInTree[], targetMessageId?: string): ChatItemInTree[] {
let ret: ChatItemInTree[] = []
let targetNode: ChatItemInTree | undefined
// find path to the target message
const stack = tree.toReversed().map(rootNode => ({
node: rootNode,
path: [rootNode],
}))
while (stack.length > 0) {
const { node, path } = stack.pop()!
if (
node.id === targetMessageId
|| (!targetMessageId && !node.children?.length && !stack.length) // if targetMessageId is not provided, we use the last message in the tree as the target
) {
targetNode = node
ret = path.map((item, index) => {
if (!item.isAnswer)
return item
const parentAnswer = path[index - 2]
const siblingCount = !parentAnswer ? tree.length : parentAnswer.children!.length
const prevSibling = !parentAnswer ? tree[item.siblingIndex! - 1]?.children?.[0]?.id : parentAnswer.children![item.siblingIndex! - 1]?.children?.[0].id
const nextSibling = !parentAnswer ? tree[item.siblingIndex! + 1]?.children?.[0]?.id : parentAnswer.children![item.siblingIndex! + 1]?.children?.[0].id
return { ...item, siblingCount, prevSibling, nextSibling }
})
break
}
if (node.children) {
for (let i = node.children.length - 1; i >= 0; i--) {
stack.push({
node: node.children[i],
path: [...path, node.children[i]],
})
}
}
}
It seems there is something wrong here.
What browser are you using?
Looks like toReversed
is not compatible to your browser.
Self Checks
Dify version
0.11.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
Using Docker Compose to newly deploy the latest version of Dify on the company’s virtual machine. Import the previous DSL and call it normally via the API. After the call, click on Logging and Annotation, then click on a log entry.
✔️ Expected Behavior
There should be call details displayed.
❌ Actual Behavior