Forum Replies Created
-
AuthorPosts
-
December 19, 2022 at 1:59 am in reply to: Faulty generation of log files after reducing the value of MaxParts #3393
Hi,
Thank you for posting the additional details and clarifications. I am able to duplicate the behavior that you reported. The crux of the issue is that the Dispatcher looks in the specified folder for all log file parts, and ends up selecting the “last” part file. The assumption is that the last part file in the directory is either the MaxParts log file or an earlier log file part. So the last part file is selected and checked for MaxSize. If the file exceeds MaxSize, then the next part number is calculated from the “last” part file.
The problem is that the assumption above is incorrect in the situation that you describe. The “last” log file represents a log file part that already exceeds MaxParts, which is why the parts increase. Well, the part files increase until the number of digits needed to represent the parts changes to a new order of magnitude. For example, in Sample 1, the parts increase to 7, 8, 9, and then at 10 the file size just grows forever. In Sample 2, the parts increase to 13, 14, 15, etc. all the way to 98, 99. Then at 100 the file size just grows forever.
Part of the fix for this is to NOT use the “last” part file name if it exceeds the MaxParts value. However, this is fine if the MaxParts value does not cross a power of 10 value. For example, in Sample 1, MaxParts went from 6 to 3. No problem. However, for Sample 2, MaxParts changes from 12 to 8, which crosses 10. The problem is that the file parts are named differently when MaxParts is set to 12 versus 8. When MaxParts is set to 12, the file parts will have names like:
Sample_01.csl
Sample_02.csl
. . .
Sample_12.cslHowever, with MaxParts set to 8, the file parts will have names such as:
Sample_1.csl
Sample_2.csl
Sample_8.cslThe fact that the format of the log file parts is different makes recovering from this situation rather complicated. There are a couple ways in which this could be handled. First, the code that looks for the “last” part needs to be more specific about finding a match and consider the difference between the two cases above. So, in Sample 2 when the MaxParts is 8, the code would look for Sample_1, etc. and NOT consider Sample_01 as a matching part. In this case, after switching MaxParts from 12 to 8, the log file parts would essentially start over at Sample_1.csl, and the existing Sample_01.csl to Sample_12.csl files would remain unchanged and be there forever, even after the “new” Sample_1.csl to Sample_8.csl files get rotated out.
The second method of handling things would be to change the way the log file parts are named and simply use 4 digits for all log file parts. So, the file names would look like:
Sample_0001.csl
Sample_0002.csl
. . .
Sample_0012.cslThis is the solution that I am leaning towards, but I’m not sure it makes sense to do this for CodeSite 5 because of the implications it would have on existing deployments. Essentially, all log file parts would reset to *_0001.csl, which is no different than the problem I described earlier.
This type of change is more likely for CodeSite 6, when there are more significant changes in the product and how destinations are managed, and resetting log file parts for an application would be more easily facilitated during an upgrade.
With all of this in mind, I am curious to gain a better understanding of how you are using the MaxParts property. Specifically, is the MaxParts property something that gets changed a lot for your application? What is the process that results in the property value changing? Do you provide access to change this on an end user machine, or is it simply set internally by you (i.e. developer)? How often does the value change?
In all the years that CodeSite has supported log file parts, this issue has never been reported. I suspect because the MaxParts value is typically not changed (at least not decreased), and if the property is changed, the existing log file parts are simply deleted when deploying the application. Hence, I am curious to understand the implication of this particular issue on your deployment.
Ray
December 8, 2022 at 2:34 pm in reply to: Faulty generation of log files after reducing the value of MaxParts #3383Hi,
For issue 1, is it correct to assume that with the MaxSize=40 and MaxParts=6 that before you change the MaxParts to 3, you have 6 log files that already exist in the directory, and then you start doing file logging with the new MaxParts value of 3? I’m trying to understand the sequence of steps so that I can try to reproduce. And please confirm that all you changed was the MaxParts value to 3–that is, you did not change any other properties.In regards to Issue 2, you state “new log files are also generated on top of the existing ones.” Can you be more specific about what exactly you are seeing in this situation?
Also, your comment “no file should exceed the size limit set by the MaxSize whatsoever” is not valid. Since each CodeSite message is variable in size, it is possible that the last message saved to a log file part will result in the log file part being larger than the MaxSize value. The MaxSize value specifies whether or not the next CodeSite message is allowed to be added to the file. If the current log file part is less than MaxSize, then the message is saved to the log file.
We considered looking at the size of the next message to be saved, and then only save to the current log file part if the resulting size will be less than MaxSize. However, then you need to consider what happens if the next message is larger than MaxSize, which can happen with screenshots, for example. Then you end up with a log file part larger than MaxSize anyway, because you have save the message is the log file part. We did not see the benefit outweighing the added complexity.
Ray
Hi Ariagna,
The software is distributed via a download link, but once you download it onto a computer (obviously with internet access), you can copy the installer to the desired computer and run it from there. The installer does not require internet access.
Ray
December 8, 2022 at 12:39 am in reply to: Forbidden (403) error when downloading Bonus KSVC 7.0 #3380Hi Paul,
Thank you for sharing how you were able to resolve the issue with the GetIt Package Manager download.
Ray
The csmDataSet message constant is defined in the CodeSiteDBTools unit. That unit also defines the CodeSite custom formatters for sending TDataSet and TDataSetRecord values. However, as Rich mentioned, the CodeSiteDBTools unit is available in the CodeSite Studio edition and not CodeSite Express.
Ray
Very good. One little tip: if you first select the message that matches the criteria you are interested in (e.g. Thread), and then invoke the New View dialog box, the various fields will be pre-populated with the values of the selected message. Makes it much faster to select your desired criteria.
Ray
December 5, 2022 at 10:00 pm in reply to: Forbidden (403) error when downloading Bonus KSVC 7.0 #3368Hi Paul,
I am sorry to hear you are having issues with the GetIt Package Manager. Unfortunately, we have no control over that, and I would suggest that you contact Embarcadero.
Ray
Hi Ariagna,
There is no separate manual, but the CodeSite Help has a lot of information about the product. You can get to the Help file from the Help menu of any of the CodeSite Tools (e.g. CodeSite Live Viewer). You can also get to the CodeSite Help file from within the RAD Studio IDE by selecting the Tools > CodeSite > CodeSite Help menu item.
In regards to your other question about “CodeSite Studio is planned to be applied at the server level”, I’m not sure I completely understand your intention. However, I can say that each CodeSite message contains the name of the Computer from which the message originated.
Ray
Hi Mark,
Embarcadero acquired the components back in 2015. The Konopka Signature VCL Controls is available via the GetIt Package Manager within recent versions of Delphi. Startup of the RAD Studio (Delphi) IDE and select the Tools > GetIt Package Manager menu item. Then type “Konopka” into the search box and you will find the entry for KSVC. Click the Install button to install. The source code is installed during the installation.
Ray
Hi Ariagna,
In regards to #1, there are a few situations that can affect whether or not a CodeSite message makes it from your application code to the Live Viewer.
- The CodeSite logger that is used to send the message has its Enabled property set to False.
- The CodeSiteManager.Enabled property is set to False.
- If a CodeSite logger is set to use a Destination that does NOT include the Viewer, then any messages generated by that logger will NOT show up in the Live Viewer.
- The CodeSite logger is trying to use a destination that is not valid. This would manifest itself in the CodeSite Dispatcher (the icon would turn red, and there Dispatcher Log would show an error). In this case, the logger would become disabled.
- The Live Viewer could be configured to Block Incoming Messages. Check the Tools > Block Incoming Messages menu item.
- The CodeSite Dispatcher could be configured to block categories of messages. CodeSite messages that specify a Category that is blocked will not be sent to the final destination.
When using the Dispatcher to block a Category, the CodeSite logger still generates the CodeSite message and sends it to the Dispatcher. As noted above, the Dispatcher then stops the message from going further, if the message’s Category is blocked.
A better approach to control the amount of messages that your application generates is to use separate loggers and enable or disable the loggers as needed. For example, you could create a csCritical logger that is always enabled and is used for logging critical information. You could then create other loggers based on how you want to control the amount of logging. The use of Categories and Logger instances makes CodeSite quite a bit different than traditional log-level approaches.
Hope this helps,
RayHi Ariagna,
CodeSite Studio is sold as a traditional software license. It is a one-time payment, and NOT a subscription. The license is the traditional “like a book” license. You are allowed to install the logging classes (the code that you link into your programs) onto multiple machines provided you are the only one using the software at a time. If you have another developer that will be compiling/building code using the CodeSite logging classes, then a separate license should be purchased for each developer.Ray
Hi Ariagna,
Thank you for your interest in CodeSite Studio. I will do my best to answer your questions.
1. I believe what you are asking for in this question is the ability to encrypt the data that is captured with CodeSite. The current version of CodeSite does not support automatically encrypting the message data. We are investigating ways to do this in a relatively seamless manner for a future release.
2. The current version of CodeSite Studio supports sending CodeSite messages to a remote computer using TCP. Specifically, your application would specify a TCP remote destination. Then when your app generates a CodeSite message, it is sent to the CodeSite Dispatcher running locally on the machine. Then the local Dispatcher will send the message to the CodeSite Dispatcher that is running on the remote computer. The Remote Dispatcher will then typically save the CodeSite message to a log file.
3. There are several methods of controlling the amount of data that is generated/sent by CodeSite. For example, you can setup separate CodeSite loggers and specify a Category for each logger. Then you can Enable/Disable the loggers as necessary to control the amount of messages that are logged. The Viewers also provide the ability to create filtered views so that you only see the messages that you are interested in. For example, you can create a new view that only shows you messages from a specific process.I hope this answers your questions.
RayHi Chris,
Thank you for submitting the report. I have also been very frustrated with the situation. This is one of the reasons why I have been encouraging people to submit reports so that Embarcadero can see that many, many developers are dependent on these components. I will be presenting at EKON in a couple weeks and will try to connect with Embarcadero team members in attendance.
Ray
Hi Chris,
Thanks for sending the test project. I was able to reproduce the issue you are running into. The fact that you are building a 64-bit application is key to the issue. More specifically, the “Support address space layout randomization” setting, which in 11.2 is set to True by default for 64-bit applications. You can work around the issue by turning this setting to False. The setting is located in:
Project Options
Building
Delphi Compiler
Linking
Support address space layout randomizationAs for reporting issues with KSVC, Embarcadero still hasn’t added specific entries for the components. However, Marco Cantu has suggested that issues can be reported under the general VCL category. Furthermore, the subject of the issue should start with KSVC so that the issue is marked as a KSVC-related issue. For example, if you go to Quality Portal and conduct an issue search for “KSVC” you will see many other examples.
Ray
Hi Chris,
I have been unable to duplicate the error condition you are experiencing. Are you able to reproduce the issue in a test project? If so, please send the source (no executables) to support at raize.com and I’ll take a look. I’m curious if there are property settings that are resulting in the error.
I would also encourage you to file a report about this issue on Embarcadero’s Quality Portal so they are aware of the issue. Any fix will need to come from Embarcadero as they own the components now.
Ray
-
AuthorPosts