* @brief Write plugin names */
| 156 | * @brief Write plugin names |
| 157 | */ |
| 158 | void CConfigLog::WritePluginsInLogFile(const wchar_t *transformationEvent) |
| 159 | { |
| 160 | CVersionInfo EXEversion; |
| 161 | String sEXEPath = paths::GetPathOnly(paths::GetLongPath(EXEversion.GetFullFileName(), false)); |
| 162 | |
| 163 | // get an array with the available scripts |
| 164 | PluginArray * piPluginArray; |
| 165 | |
| 166 | piPluginArray = |
| 167 | CAllThreadsScripts::GetActiveSet()->GetAvailableScripts(transformationEvent); |
| 168 | |
| 169 | for (size_t iPlugin = 0 ; iPlugin < piPluginArray->size() ; iPlugin++) |
| 170 | { |
| 171 | const PluginInfoPtr& plugin = piPluginArray->at(iPlugin); |
| 172 | String sPluginText; |
| 173 | String sFileName = paths::GetLongPath(plugin->m_filepath); |
| 174 | if (sFileName.length() > sEXEPath.length()) |
| 175 | if (sFileName.substr(0, sEXEPath.length()) == sEXEPath) |
| 176 | sFileName = _T(".") + sFileName.erase(0, sEXEPath.length()); |
| 177 | |
| 178 | String sModifiedTime = _T(""); |
| 179 | sModifiedTime = GetLastModified(plugin->m_filepath); |
| 180 | if (!sModifiedTime.empty()) |
| 181 | sModifiedTime = _T("[") + sModifiedTime + _T("]"); |
| 182 | |
| 183 | sPluginText = strutils::format |
| 184 | (_T("\r\n %s%-36s path=%s %s"), |
| 185 | plugin->m_disabled ? _T("!") : _T(" "), |
| 186 | plugin->m_name, |
| 187 | maskUserNameInPath(sFileName), |
| 188 | sModifiedTime |
| 189 | ); |
| 190 | m_pfile->WriteString(sPluginText); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * @brief String wrapper around API call GetLocaleInfo |
nothing calls this directly
no test coverage detected