A method for generating and controlling logging data in a device management, DM, system (100, 101), the method comprising: receiving, by a DM client, a command for storing logging data from a DM server; determining, by the DM client, a position for storing the logging data in a logging sub-tree, characterized in that: - the logging sub-tree comprises: ∘ a 'Control' node; ∘ a control part connected with the 'Control' node for controlling a method for storing the logging data; ∘ a 'Data' node; and ∘ a data part connected with the 'Data' node for providing a space for storing the logging data, and - the control part comprises: ∘ a 'Size' node indicating a maximum number of logging data that can be stored; ∘ a 'Current' node indicating a position where a next logging data is to be stored; and ∘ a 'Recursive' node indicating how to process new logging data when the space for storing the logging data is full; and further characterized by storing, by the DM client, the logging data in the determined position in the logging sub-tree, wherein the step of storing the logging data comprises: - checking, by the DM client, whether there is an empty logging storage space; - if there is an empty logging space, generating, by the DM client, a new folder node indicated by a value of the 'Current' node and storing the logging data in the new folder node; - if there is no empty space: ∘ checking, by the DM client, whether a value in the 'Recursive' node within the logging sub-tree is true; ∘ determining, by the DM client, a position of a node to be deleted with reference to a value of the 'Current' node if the value of the 'Recursive' node is true; and ∘ deleting, by the DM client, all data included in the determined node and storing the logging data. receiving, by a DM client, a command for storing logging data from a DM server; determining, by the DM client, a position for storing the logging data in a logging sub-tree, characterized in that: - the logging sub-tree comprises: ∘ a 'Control' node; ∘ a control part connected with the 'Control' node for controlling a method for storing the logging data; ∘ a 'Data' node; and ∘ a data part connected with the 'Data' node for providing a space for storing the logging data, and - the control part comprises: ∘ a 'Size' node indicating a maximum number of logging data that can be stored; ∘ a 'Current' node indicating a position where a next logging data is to be stored; and ∘ a 'Recursive' node indicating how to process new logging data when the space for storing the logging data is full; - the logging sub-tree comprises: ∘ a 'Control' node; ∘ a control part connected with the 'Control' node for controlling a method for storing the logging data; ∘ a 'Data' node; and ∘ a data part connected with the 'Data' node for providing a space for storing the logging data, and ∘ a 'Control' node; ∘ a control part connected with the 'Control' node for controlling a method for storing the logging data; ∘ a 'Data' node; and ∘ a data part connected with the 'Data' node for providing a space for storing the logging data, and - the control part comprises: ∘ a 'Size' node indicating a maximum number of logging data that can be stored; ∘ a 'Current' node indicating a position where a next logging data is to be stored; and ∘ a 'Recursive' node indicating how to process new logging data when the space for storing the logging data is full; ∘ a 'Size' node indicating a maximum number of logging data that can be stored; ∘ a 'Current' node indicating a position where a next logging data is to be stored; and ∘ a 'Recursive' node indicating how to process new logging data when the space for storing the logging data is full; and further characterized by storing, by the DM client, the logging data in the determined position in the logging sub-tree, wherein the step of storing the logging data comprises: - checking, by the DM client, whether there is an empty logging storage space; - if there is an empty logging space, generating, by the DM client, a new folder node indicated by a value of the 'Current' node and storing the logging data in the new folder node; - if there is no empty space: ∘ checking, by the DM client, whether a value in the 'Recursive' node within the logging sub-tree is true; ∘ determining, by the DM client, a position of a node to be deleted with reference to a value of the 'Current' node if the value of the 'Recursive' node is true; and ∘ deleting, by the DM client, all data included in the determined node and storing the logging data. - checking, by the DM client, whether there is an empty logging storage space; - if there is an empty logging space, generating, by the DM client, a new folder node indicated by a value of the 'Current' node and storing the logging data in the new folder node; - if there is no empty space: ∘ checking, by the DM client, whether a value in the 'Recursive' node within the logging sub-tree is true; ∘ determining, by the DM client, a position of a node to be deleted with reference to a value of the 'Current' node if the value of the 'Recursive' node is true; and ∘ deleting, by the DM client, all data included in the determined node and storing the logging data. ∘ checking, by the DM client, whether a value in the 'Recursive' node within the logging sub-tree is true; ∘ determining, by the DM client, a position of a node to be deleted with reference to a value of the 'Current' node if the value of the 'Recursive' node is true; and ∘ deleting, by the DM client, all data included in the determined node and storing the logging data.